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