rnaeye has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to learn about Perl complex data structures. I was wondering if anyone could tell me how to deference and print @my_array_reference2. Thank you.
#This one prints: my @my_array_reference1 = ( [qw(blue green red yellow)] ); foreach (@my_array_reference1){ print "@$_"; }; ############################################## #How can I dereference and print this one: my @my_array_reference2 = ( 'BLACK', [qw(blue green red yellow)] );
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: how to dereference anonymous array
by Util (Priest) on Oct 18, 2011 at 18:06 UTC | |
Re: how to dereference anonymous array
by zentara (Archbishop) on Oct 18, 2011 at 17:58 UTC | |
Re: how to dereference anonymous array
by choroba (Cardinal) on Oct 18, 2011 at 21:18 UTC |
Back to
Seekers of Perl Wisdom