This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Unused 'cv'
[perl5.git] / pod / perlrun.pod
index c2b5393..c3b30c8 100644 (file)
@@ -13,7 +13,7 @@ B<perl>       S<[ B<-sTtuUWX> ]>
        S<[ B<-S> ]>
        S<[ B<-x>[I<dir>] ]>
        S<[ B<-i>[I<extension>] ]>
-       S<[ B<-eE> I<'command'> ] [ B<--> ] [ I<programfile> ] [ I<argument> ]...>
+       S<[ [B<-e>|B<-E>] I<'command'> ] [ B<--> ] [ I<programfile> ] [ I<argument> ]...>
 
 =head1 DESCRIPTION
 
@@ -77,9 +77,10 @@ Parsing of the #! switches starts wherever "perl" is mentioned in the line.
 The sequences "-*" and "- " are specifically ignored so that you could,
 if you were so inclined, say
 
-    #!/bin/sh -- # -*- perl -*- -p
-    eval 'exec perl -wS $0 ${1+"$@"}'
-        if $running_under_some_shell;
+    #!/bin/sh
+    #! -*-perl-*-
+    eval 'exec perl -x -wS $0 ${1+"$@"}'
+        if 0;
 
 to let Perl see the B<-p> switch.
 
@@ -341,6 +342,11 @@ that enabled the use of Unicode-aware "wide system call" Win32 APIs.
 This feature was practically unused, however, and the command line
 switch was therefore "recycled".)
 
+B<Note:> Since perl 5.10.0, the -C option can no longer be used
+on the #! line. It wasn't working there anyway, since the standard streams
+are already set up at this point in the execution of the perl interpreter.
+You can use binmode() instead to get the desired behaviour.
+
 =item B<-c>
 X<-c>
 
@@ -655,6 +661,10 @@ Note that the lines are not printed by default.  See B<-p> to have
 lines printed.  If a file named by an argument cannot be opened for
 some reason, Perl warns you about it and moves on to the next file.
 
+Also note that C<< <> >> passes command line arguments to
+L<perlfunc/open>, which doesn't necessarily interpret them as file names.
+See  L<perlop> for possible security implications.
+
 Here is an efficient way to delete all files that haven't been modified for
 at least a week:
 
@@ -964,7 +974,7 @@ is used. The program should instead say:
 X<PERL5OPT>
 
 Command-line options (switches).  Switches in this variable are taken
-as if they were on every Perl command line.  Only the B<-[CDIMUdmtw]>
+as if they were on every Perl command line.  Only the B<-[CDIMUdmtwW]>
 switches are allowed.  When running taint checks (because the program
 was running setuid or setgid, or the B<-T> switch was used), this
 variable is ignored.  If PERL5OPT begins with B<-T>, tainting will be