You probably mean @ARGV instead.
Checking the index of the last element of the array is rarely the best option, too. In scalar context, the array gives you the number of elements -- that works very well in the boolean context used here:
die "Exiting without parameter.\n" unless @ARGV;In reply to Re: Test for parameters?
by chromatic
in thread Test for parameters?
by Guildencrantz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |