- publishing free software manuals
Perl Language Reference Manual
by Larry Wall and others
Paperback (6"x9"), 724 pages
ISBN 9781906966027
RRP £29.95 ($39.95)

Sales of this book support The Perl Foundation! Get a printed copy>>>

2.2 Running Perl programs

To run a Perl program from the Unix command line:

perl progname.pl

Alternatively, put this as the first line of your script:

#!/usr/bin/env perl

... and run the script as /path/to/script.pl. Of course, it'll need to be executable first, so chmod 755 script.pl (under Unix).

(This start line assumes you have the env program. You can also put directly the path to your perl executable, like in #!/usr/bin/perl).

For more information, including instructions for other platforms such as Windows and Mac OS, read 3.

ISBN 9781906966027Perl Language Reference ManualSee the print edition