From 3bbcc830de5b39568997aa65d260ed9901f3098a Mon Sep 17 00:00:00 2001 From: Jeff Pinyan Date: Tue, 3 Oct 2000 12:35:42 -0400 Subject: [PATCH] Re: [ID 20000930.002] perlrun nor perldelta mention -s modification Message-ID: p4raw-id: //depot/perl@7144 --- pod/perlrun.pod | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pod/perlrun.pod b/pod/perlrun.pod index 98ab39c..d8fb12c 100644 --- a/pod/perlrun.pod +++ b/pod/perlrun.pod @@ -577,7 +577,8 @@ recognized by the C preprocessor such as "if", "else", or "define".) enables rudimentary switch parsing for switches on the command line after the program name but before any filename arguments (or before -a B<-->). Any switch found there is removed from @ARGV and sets the +an argument of B<-->). This means you can have switches with two leading +dashes (B<--help>). Any switch found there is removed from @ARGV and sets the corresponding variable in the Perl program. The following program prints "1" if the program is invoked with a B<-xyz> switch, and "abc" if it is invoked with B<-xyz=abc>. @@ -585,6 +586,9 @@ if it is invoked with B<-xyz=abc>. #!/usr/bin/perl -s if ($xyz) { print "$xyz\n" } +Do note that B<--help> creates the variable ${-help}, which is not compliant +with C. + =item B<-S> makes Perl use the PATH environment variable to search for the -- 2.7.4