- 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>>>

-x

-xdirectory

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 4.14)

If a directory name is specified, Perl will switch to that directory before running the program. The -x switch controls only the disposal of leading garbage. The program must be terminated with __END__ if there is trailing garbage to be ignored (the program can process any or all of the trailing garbage via the DATA filehandle if desired).

The directory, if specified, must appear immediately following the -x with no intervening whitespace.

ISBN 9781906966027Perl Language Reference ManualSee the print edition