All the passed arguments to your program are found in
the (special) array @ARGV. And we have standard
Perl idiom to iterate over an array, without the need to
know the size of the array: foreach. So you'll
get code like:
foreach my $argument (@ARGV) {
... do something with $argument ...
}