The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

perldl - Simple shell for PDL

SYNOPSIS

        %> perldl
        perldl> $a=sequence(10) # or any other PDL command

DESCRIPTION

The program perldl is a simple shell (written in perl) for interactive use of PDL. perl/PDL commands can simply be typed in - and edited if you have appropriate version of the ReadLines and ReadKeys modules installed. In that case perldl also supports a history mechanism where the last 50 commands are always stored in the file .perldl_hist in your home directory between sessions. The command l [number] shows you the last number commands you typed where number defaults to 20.

e.g.:

   % perldl
   ReadLines enabled
   perldl> $a = rfits "foo.fits"
   BITPIX =  -32  size = 88504 pixels 
   Reading  354016 bytes
   BSCALE =  &&  BZERO = 
   
   perldl> imag log($a+400)
   Displaying 299 x 296 image from 4.6939525604248 to 9.67116928100586 ...

Miscellaneous shell features:

  1. The shell aliases p to be a convenient short form of print, e.g.

       perldl> p ones 5,3
        
       [
        [1 1 1 1 1]
        [1 1 1 1 1]
        [1 1 1 1 1]
       ]
       

    'q' and 'x' are short-hand for quit.

    'l' lists the history buffer

    '?' is an alias for help

    'help', 'apropos', 'usage' and 'sig': all words after these commands are used verbatim and not evaluated by perl. So you can write, e.g.,

        help help

    instead of

        help 'help'
  2. If the file ~/.perldlrc is found it is sourced at start-up to load default modules, set shell variables, etc. If it is NOT found the distribution file PDL/default.perldlrc is read instead. This loads various modules considered useful by default, and which ensure compatibility with v1.11. If you don't like this and want a more streamlined set of your own favourite modules simple create your own ~/.perldlrc

    To set even more local defaults the file local.perldlrc (in the current directory) is sourced if found. This lets you load modules and define subroutines for the project in the current directory.

    The name is chosen specfically because it was found hidden files were NOT wanted in this circumstances.

  3. Shell variables: (if you don't like the defaults change them in ~/.perldlrc

    $PERLDL_ESCAPE - default value '#'

    Any line starting with this character is treated as a shell escape. The default value is chosen because it escapes the code from the standard perl interpreter.

    $PERLDL_PROMPT - default value 'perldl> '

    Enough said

    $HOME

    The users home directory

  4. A useful idiom for developing perldl scripts or editing functions on-line is

          perldl> # emacs script &
                          -- add perldl code to script and save the file
          perldl> do 'script'

    -- substitute your favourite window-based editor for 'emacs' (you may also need to change the '&' on non-Unix systems).

    Running "do 'script'" again updates any variables and function definitions from the current version of 'script'.

Command-line options

-tk

Load Tk when starting the shell (the perl Tk module, which is available from CPAN must be installed). This enables readline event loop processing.

-f file

Loads the file before processing any user input. Any errors during the execution of the file are fatal.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 389:

=over without closing =back