- 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.3 Safety net

Perl by default is very forgiving. In order to make it more robust it is recommended to start every program with the following lines:

#!/usr/bin/perl
use strict;
use warnings;

The two additional lines request from perl to catch various common problems in your code. They check different things so you need both. A potential problem caught by use strict; will cause your code to stop immediately when it is encountered, while use warnings; will merely give a warning (like the command-line switch -w) and let your code run. To read more about them check their respective manual pages at "Perl pragma to restrict unsafe constructs" (strict) in the Perl Library Reference Manual (Volume 1) and "Perl pragma to control optional warnings" (warnings) in the Perl Library Reference Manual (Volume 1).

ISBN 9781906966027Perl Language Reference ManualSee the print edition