go ahead... be a heretic | |
PerlMonks |
Re^3: $# -variable?by reneeb (Chaplain) |
on Jul 27, 2006 at 12:59 UTC ( [id://564059]=note: print w/replies, xml ) | Need Help?? |
If someone plays with $[, and you are using a loop as shown above, you have problems with both expressions $#array and scalar(@array).
So, if you want to ensure that your loop does what you want, you have to use this one:
or
In Section
Seekers of Perl Wisdom
|
|