Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: insert value into an array

by inman (Curate)
on Feb 14, 2006 at 09:54 UTC ( #530067=note: print w/replies, xml ) Need Help??

in reply to insert value into an array

You are just wanting to push the value onto the appropriately dereferenced list.
push @{$arr[1][1]}, 222;
As with some of the other comments, the declaration of the structure leads me to believe that the OP was trying to specify a hash of lists. e.g.
my %hoa=("one" => [1,11], "two"=> [2,22]);
in which case
push @{$hoa{two}}, 222;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://530067]
[Discipulus]: as good as the Roma foundation
Discipulus we began with a fratricide..
[erix]: ah, Romulus killed Remus. Sad! ;)
erix .oO( does Trump have a brother ? )
[Discipulus]: yes a minor one:
[Discipulus]: Trumpet
Discipulus or is a dog, cat..?

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (12)
As of 2017-01-20 13:07 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (174 votes). Check out past polls.