in reply to new keyword "size" to avoid scalar trap ? ( scalar @array != scalar(LIST) )
Do you even need prototypes?
use 5.010; sub size { @_ + 0 } say size 'a' .. 'z'; my @foo = (1, 2, 3); say size @foo;
|
|---|
| 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:04 UTC | |
by tobyink (Canon) on Dec 07, 2012 at 22:33 UTC |