>>>>> "Chas" == Chas Owens <[EMAIL PROTECTED]> writes:

Chas> In cases where you expect 0 to be a valid value it may be better to use
Chas> this construct:

Chas> $var = defined($ARGV[0]) ? $ARGV[0] : DEFAULT;

I prefer the sensible:

$var = @ARGV ? shift : DEFAULT;

Why test defined when you know the length of the array?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Reply via email to