Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Multidimensional arrays within arrays

by reaper9187 (Scribe)
on Jan 23, 2013 at 20:37 UTC ( #1015019=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    @a = qw/Mon Tue Wed Thurs/;
    
    ...
    print Dumper(\@$key);    
    }
    
  2. or download this
    #Declare array as 
    push(@$key, #some values);
    ...
    ..
    ..
    #Alhtough this will help me to get the desired array format , however 
    +the most irritating part is that the variable $key is constant ,i.e e
    +vn if i iterate it over a loop, only one array ( i.e @key is generate
    +d and the reference for all the arrays is the same)
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1015019]
help
Chatterbox?
[shmem]: $list_addiction should be $list_addition
Discipulus loose the tozzetto party!
[shmem]: .oO( addition of cookies for addiction to cookies )
[Lady_Aleena]: Other than my typos shmem. 8)
[shmem]: otherwise fine
[Discipulus]: tozzetti & vinsanto
[Lady_Aleena]: The whole line is push @line, ref($list_addition ) ? @$list_addition : $list_addition if $list_addition;
[Lady_Aleena]: And I forgot to do the array check, I'm such a doofus today.
[Lady_Aleena]: push @line, ref($list_addition ) eq 'ARRAY' ? @$list_addition : $list_addition if $list_addition; #trying again
[shmem]: Discipulus: yummy. I like those. Didn't have them for some time now, forgot the name. Should go get some...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2017-04-27 11:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (503 votes). Check out past polls.