From: Bram Date: Sun, 27 Apr 2008 21:13:36 +0000 (+0200) Subject: doc patch for perlrun -x X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3d6c2ba7f810e9262a5ab163b7db957e54c6f909;p=p5sagit%2Fp5-mst-13.2.git doc patch for perlrun -x Message-ID: <20080427211336.g8mvjusbcc4gwsk4@horde.wizbit.be> p4raw-id: //depot/perl@33760 --- diff --git a/pod/perlrun.pod b/pod/perlrun.pod index 74fd0ad..a8458a8 100644 --- a/pod/perlrun.pod +++ b/pod/perlrun.pod @@ -899,6 +899,14 @@ tells Perl that the program is embedded in a larger chunk of unrelated ASCII text, such as in a mail message. Leading garbage will be discarded until the first line that starts with #! and contains the string "perl". Any meaningful switches on that line will be applied. + +All references to line numbers by the program (warnings, errors, ...) +will treat the #! line as the first line. +Thus a warning on the 2nd line of the program (which is on the 100th +line in the file) will be reported as line 2, and not as line 100. +This can be overridden by using the #line directive. +(See L) + If a directory name is specified, Perl will switch to that directory before running the program. The B<-x> switch controls only the disposal of leading garbage. The program must be terminated with