It seems that you want to find out how your (unformatted) snippet parses the command line:
###################################################################### ###################################################################### sub main { my $gen_public = 0; my $version = "0.1"; while ($arg = shift @ARGV) { $gen_public = 1 if ($arg eq "-p"); if ($arg eq "-v") { $version = shift @ARGV; $XLFILE =~ s/v0\.1/v$version/g; } } # .... rest elided }
You run Perl scripts for example by using perl -w path/to/that/script.pl. Looking at the code, it looks for a -p switch or a -vswitch and sets some variables. All the values from the command line get stuffed into the @ARGV array, see perlvar on that.
In reply to Re^3: Perl command line switches
by Corion
in thread Perl command line switches
by Irakro1997
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |