Do you know where your variables are? | |
PerlMonks |
Re^2: Why doesn't this die with "Can't use an undefined value as an ARRAY reference"?"by kikuchiyo (Hermit) |
on Oct 19, 2017 at 13:50 UTC ( [id://1201678]=note: print w/replies, xml ) | Need Help?? |
One more thing I've just noticed: The perldelta fragment mentions for(scalar($#foo)) { ... }. But what does this even mean? Why would anybody do this? $#foo is already a scalar (the index of the last element of @foo), why would anybody call scalar on it, and why would anybody use it in a foreach? If you want to enlarge or shrink the array via $#foo, you can do it simply by $#foo = 43;. This foreach nonsense is just obfuscation and I don't see why was it "corrected".
In Section
Seekers of Perl Wisdom
|
|