in reply to Migrating scripts back to Perl 5.005_03
and$some_array[3](@args); # 5.6 only
Not quite what you have. 5.6 permits the arrow to be dropped for coderefs using the same rules as dropping the arrow for arrayrefs and hashrefs. You still can't drop the arrow at the head of a subscripty chain, now or then, as your example would suggest.$somearray[3]->(@args); # 5.5 and 5.4
The coderef arrow notation itself was introduced in 5.4, on a bet. I think I've recounted that story here before somewhere.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|