You can also use this:
$numArgs = @ARGV; #counts the number of elements in @ARGV in scalar context
instead of:
$numArgs = $#ARGV + 1;
alternatives
You can also use this:
instead of: