Difference between revisions of "Perl"
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
* get cpan if necessary and install (may also need Test::Simple and Digest::SHA to aid in downloading and checking of modules. | * get cpan if necessary and install (may also need Test::Simple and Digest::SHA to aid in downloading and checking of modules. | ||
* sudo cpan -i Foo::Bar (get name of Foo::Bar from cpan.org) | * sudo cpan -i Foo::Bar (get name of Foo::Bar from cpan.org) | ||
− | * perldoc Foo::Bar = see man pages of the module you just downloaded | + | * perldoc Foo::Bar = see user contributed perl documentation (man pages) of the module you just downloaded |
==Executables== | ==Executables== |
Revision as of 18:45, 18 November 2009
Using Modules
- perldoc perllocal = shows what modules are installed on a given system
- get cpan if necessary and install (may also need Test::Simple and Digest::SHA to aid in downloading and checking of modules.
- sudo cpan -i Foo::Bar (get name of Foo::Bar from cpan.org)
- perldoc Foo::Bar = see user contributed perl documentation (man pages) of the module you just downloaded
Executables
- cpan
- perldoc = Look up Perl documentation in Pod format.
- -f perlfunc = look up specific builtin functions, ex: perldoc -f sprintf
Running Perl "perlrun"
- perl -V = Summary of perl5 configuration.
- perl -d and -D = debug options
Syntax
- indicate end of program using the "__END__" token
- specify certain version of perl by statement "use 5.005_54;" or similar