Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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;


Comment on Re^3: Map a string to an array
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2014-12-29 07:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (185 votes), past polls