Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Push function

by GrandFather (Saint)
on Apr 06, 2009 at 20:51 UTC ( #755849=note: print w/replies, xml ) Need Help??


in reply to Push function

Note that you don't need to 'make space'. Consider:

use strict; use warnings; use Data::Dump::Streamer; my @arr = ([11, 22, [[]]], [333, 444, []], [6666, 7777, []]); push @{$arr[0][2][0]}, 3; Dump \@arr; @arr = ([11, 22], [333, 444], [6666, 7777]); push @{$arr[0][2][0]}, 3; Dump \@arr;

Prints:

$ARRAY1 = [ [ 11, 22, [ [ 3 ] ] ], [ 333, 444, [] ], [ 6666, 7777, [] ] ]; $ARRAY1 = [ [ 11, 22, [ [ 3 ] ] ], [ 333, 444 ], [ 6666, 7777 ] ];

True laziness is hard work

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://755849]
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: (6)
As of 2022-01-27 06:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (70 votes). Check out past polls.

    Notices?