Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Map a string to an array

by runrig (Abbot)
on Nov 01, 2013 at 22:47 UTC ( #1060850=note: print w/replies, xml ) Need Help??


in reply to Re^2: Map a string to an array
in thread Map a string to an array

Not sure what you're asking. Do you want to make a copy of a 2D array? Or if you don't really need a copy, can you just use the reference.
my @arr = ( [1,2], [3,4], ); my %hash = ( FirstKey => \@arr ); my $aref = $hash{FirstKey}; my $row0 = $aref->[0]; push @$row0, 99; use Data::Dumper; print Dumper \%hash;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1060850]
help
Chatterbox?
[ambrus]: Corion: actually, schmorp has complained about how you used that syntax in the draft for AnyEvent::Impl:: Prima. I don't think he screamed, but whatever.
[ambrus]: Yes, I know you fixed that since.

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2017-02-27 14:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (388 votes). Check out past polls.