Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2016-06-30 08:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (391 votes). Check out past polls.