Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Autovivification in perl

by ikegami (Pope)
on Jan 10, 2014 at 20:27 UTC ( #1070189=note: print w/replies, xml ) Need Help??


in reply to Re: Autovivification in perl
in thread Autovivification in perl

Well,
push @{ $at_line{$string} //= [] }, $line_number;
or even
push @{ $at_line{$string} ||= [] }, $line_number;
would do.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1070189]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2016-09-25 04:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (464 votes). Check out past polls.