Perldoc Search: "$ARGV" perl-5.20.1

search official POD


10 PODs, 29 LINEs found.
perlrun.pod
308 :                  if ($ARGV ne $oldargv) {
310 :                          $backup = $ARGV . $extension;
313 :                          ($backup = $extension) =~ s/\*/$ARGV/g;
315 :                      rename($ARGV, $backup);
316 :                      open(ARGVOUT, ">$ARGV");
318 :                      $oldargv = $ARGV;
327 :          except that the -i form doesn't need to compare $ARGV to $oldargv to know when the filename has changed. It does, however, use ARGVOUT for the selected filehandle. Note that STDOUT is restored as the default output filehandle after the loop.
433 :                  & eval 'exec /usr/bin/perl -wS $0 $argv:q'
perlop.pod
1403 :             $ARGV[1] =~ tr/A-Z/a-z/;    # canonicalize to lower case ASCII
1698 :     The null filehandle <> is special: it can be used to emulate the behavior of sed and awk, and any other Unix filter program that takes a list of filenames, doing the same to each line of input from all of them. Input from <> comes either from standard input, or from each file listed on the command line. Here's how it works: the first time <> is evaluated, the @ARGV array is checked, and if it is empty, $ARGV[0] is set to "-", which when opened gives you standard input. The @ARGV array is then processed as a list of filenames. The loop
1707 :         while ($ARGV = shift) {
1708 :             open(ARGV, $ARGV);
1714 :     except that it isn't so cumbersome to say, and will actually work. It really does shift the @ARGV array and put the current filename into the $ARGV variable. It also uses filehandle *ARGV* internally. <> is just a synonym for <ARGV>, which is magical. (The pseudo code above doesn't work because it treats <ARGV> as non-magical.)
1736 :         while ($_ = $ARGV[0], /^-/) {
perlfunc.pod
2108 :             open(IN, $ARGV[0]) || die "can't open $ARGV[0]: $!";
2112 :             open(IN, "<", $ARGV[0])
2113 :                 || die "can't open < $ARGV[0]: $!";
4060 :                 $search .= "++\$seen{\$ARGV} if /\\b$word\\b/;\n";
4486 :             unshift(@ARGV, '-e') unless $ARGV[0] =~ /^-/;
perlvar.pod
688 :     $ARGV   Contains the name of the current file when reading from "<>".
690 :     @ARGV   The array @ARGV contains the command-line arguments intended for the script. $#ARGV is generally the number of arguments minus one, because $ARGV[0] is the first argument, *not* the program's command name itself. See "$0" for the command name.
perldebtut.pod
335 :             my $arg = $ARGV[0] || '-c20';
390 :             main::(temp:4): my $arg = $ARGV[0] || '-c100';
perltrap.pod
57 :               FILENAME  $ARGV
91 :     *   "ARGV" must be capitalized. $ARGV[0] is C's "argv[1]", and "argv[0]" ends up in $0.
perlvms.pod
75 :     Perl follows VMS defaults and override settings in preserving (or not preserving) filename case. Case is not preserved on ODS-2 formatted volumes on any architecture. On ODS-5 volumes, filenames may be case preserved depending on process and feature settings. Perl now honors DECC$EFS_CASE_PRESERVE and DECC$ARGV_PARSE_STYLE on those systems where the CRTL supports these features. When these features are not enabled or the CRTL does not support them, Perl follows the traditional CRTL behavior of downcasing command-line arguments and returning file specifications in lower case only.
perlfilter.pod
180 :         my $in = $ARGV[0];
perldiag.pod
70 :             open(OUT,">$ARGV[0]") or die "Can't write to $ARGV[0]: $!";
perlsyn.pod
216 :             print "$ARGV $.: $_";
<< Back to Perldoc Search