in reply to Re: Deprecated Syntax in 5.8
in thread Deprecated Syntax in 5.8
@a->... and %h->{...} are described in perldsc Data Struct Cookbook.No they aren't. They've always been conceptually illegal syntax. The problem is, up to 5.8, their illegality hadn't been enforced by the compiler, and so people who just throw random things together (rather than understanding what they're doing) ended up taking advantage of the lack of syntax checking.
@a->[$foo] is correctly written $a[$foo], while %h->{$bar} is correctly written as $h{$bar}. No references involved at all.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|