in reply to new keyword "size" to avoid scalar trap ? ( scalar @array != scalar(LIST) )
LanX:
With the scalar operator and arrays evaluating to their length in scalar contect, I don't see a need for it. But if someone decided to change perl to do something like this, I'd rather see them overload length to accept a hash, array or reference to a hash or array.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: new keyword "size" to avoid scalar trap ? ( scalar @array != scalar(LIST) )
by LanX (Saint) on Dec 07, 2012 at 17:22 UTC | |
by roboticus (Chancellor) on Dec 07, 2012 at 20:11 UTC |