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)] );
In reply to how to dereference anonymous array by rnaeye
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |