APM: Next dumb Q: IF NULL????
tmcd at panix.com
tmcd at panix.com
Tue Oct 17 21:39:10 PDT 2006
On Tue, 17 Oct 2006, CaptNemo <CaptNemo at Austin.rr.com> wrote:
> Couldn't get if (defined $ARGV[0]) to work...
It works fine for me.
> ...but, if ($#ARGV >=5) works great!
I prefer to use @array, the number of elements, rather than $#array,
the maximum subscript. (@array - 1) == $#array, unless you muck about
with $[, which I consider a really stupid idea in general.
I think it's the visual appeal of one less special character. Also,
"@array == 0" seems more natural to express the concept of an empty
list than "$#array == -1".
--
Tim McDaniel; Reply-To: tmcd at panix.com
More information about the Austin
mailing list