1PDL2(1)               User Contributed Perl Documentation              PDL2(1)
2
3
4

NAME

6       pdl2 - Simple shell (version 2) for PDL
7

SYNOPSIS

9       Use PDL interactively:
10
11         %> pdl2
12
13         pdl> $x = sequence(10)  # or any other perl or PDL command
14
15         pdl> print "\$x = $x\n";
16         $x = [0 1 2 3 4 5 6 7 8 9]
17

DESCRIPTION

19       The "pdl2" program, also known as the Perldl2 shell, is a second
20       generation version of the original "perldl" interactive PDL shell.  It
21       attempts to be backward compatible in usage while providing improved
22       features, better support for Perl syntax, and an more easily extended
23       framework based on the Devel::REPL shell.
24
25       If you have Devel::REPL version 1.003011 or later, then "pdl2" will
26       start with full functionality.  If Devel::REPL is not installed or
27       found then "pdl2" will print a warning and run the legacy "perldl"
28       shell command instead.
29
30       By default, command lines beginning with the default prompt of either
31       "pdl2" or "perldl" (one of 'pdl> ', 'PDL> ', or 'perldl> ') will have
32       the prefix string and surrounding whitespace stripped.  This allows for
33       easy cut-and-paste from sample PDL shell sessions or other examples
34       into another PDL shell session.
35

FUNCTIONS

37   do_print
38       Toggle print-by-default on and off (default value: off)
39
40       By default, "pdl2" does not print the results of operations since the
41       results can be very large (e.g., a small 640x480 RGBA image is still
42       more than 1_000_000 elements).  However, for experimenting and
43       debugging more complex structures, it helps to see the results of every
44       operation.  The "do_print" routine allows you to toggle between the
45       default "quiet" operation and a full Read, Evaluate, Loop style.
46
47         pdl> $x = pdl(3,2)
48
49         pdl> do_print
50         1
51         pdl> $x = pdl(3,2)
52         $PDL1 = [3 2];
53         pdl> do_print
54
55         pdl> $x = pdl(3,2)
56

VARIABLES

58       $PDL::toolongtoprint
59           The maximal size pdls to print (defaults to 10000 elements).  This
60           is not just a "perldl" or "pdl2" variable but it is something that
61           is usually needed in an interactive debugging session.
62

SEE ALSO

64       perldl, Devel::REPL
65
66
67
68perl v5.34.0                      2021-08-16                           PDL2(1)
Impressum