0 votes
in Perl by
Where the command line arguments are stored and if you want to read command-line arguments with Perl, how would you do that?

1 Answer

0 votes
by

The command line arguments in Perl are stored in an array @ARGV.

$ARGV[0] (the first argument)

$ARGV[1] (the second argument) and so on.

$#ARGV is the subscript of the last element of the @ARGV array, so the number of arguments on the command line is $#ARGV + 1

...