in reply to Test for parameters?
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Test for parameters?
by Guildencrantz (Sexton) on Mar 27, 2003 at 08:04 UTC | |
by Coruscate (Sexton) on Mar 27, 2003 at 08:12 UTC |