Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Dereference anonymous AoA

by AnomalousMonk (Bishop)
on Aug 08, 2014 at 16:39 UTC ( #1096782=note: print w/replies, xml ) Need Help??


in reply to Dereference anonymous AoA

Two ways:

c:\@Work\Perl\monks>perl -wMstrict -MData::Dumper -le "my $aref = [ [ 'kept', 82 ], [ 'notkept', 1 ], [ 'repaired', 3 ], ]; print Dumper $aref; ;; for my $i (0 .. $#$aref) { printf qq{label $aref->[$i][0] }; } print qq{\n ---------}; ;; for my $aref_2nd_level (@$aref) { printf qq{label $aref_2nd_level->[0] }; } " $VAR1 = [ [ 'kept', 82 ], [ 'notkept', 1 ], [ 'repaired', 3 ] ]; label kept label notkept label repaired --------- label kept label notkept label repaired

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2022-08-10 22:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?