diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-07-13 08:04:44 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-07-13 08:04:44 +0000 |
commit | 64446524dbda53cb526fa2caf0e389033c91f314 (patch) | |
tree | 8ba0cb465ce9c64655c734d6f76b8d246a48f4f6 /pod/perlintro.pod | |
parent | 3b910f1cdd4f8ae1cc44d538e0b3182f132b4bf7 (diff) | |
download | perl-64446524dbda53cb526fa2caf0e389033c91f314.tar.gz |
Nits to the perlintro safety net (by Gabor Szabo and Merijn)
p4raw-id: //depot/perl@28561
Diffstat (limited to 'pod/perlintro.pod')
-rw-r--r-- | pod/perlintro.pod | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/pod/perlintro.pod b/pod/perlintro.pod index da9c2af032..04e15686a1 100644 --- a/pod/perlintro.pod +++ b/pod/perlintro.pod @@ -59,17 +59,20 @@ Windows and Mac OS, read L<perlrun>. =head2 Safety net -Perl by default is very forgiving. In order to make it more roboust +Perl by default is very forgiving. In order to make it more robust it is recommened to start every program with the following lines: #!/usr/bin/perl use strict; use warnings; -The C<use strict;> line imposes some restrictions that will mainly stop -you from introducing bugs in your code. The C<use warnings;> is more or -less equivalent to the command line switch B<-w> (see L<perlrun>). This will -catch various problems in your code and give 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 C<use strict;> will cause your code to stop +immediately when it is encountered, while C<use warnings;> will merely +give a warning (like the command-line switch B<-w>) and let your code run. +To read more about them check their respective manual pages at L<strict> +and L<warnings>. =head2 Basic syntax overview |