http://www.perlmonks.org?node_id=932209


in reply to how to dereference anonymous array

This is a brute force approach, there may be more elegant ways.
#!/usr/bin/perl #How can I dereference and print this one: my @my_array_reference2 = ( 'BLACK', [qw(blue green red yellow)] ); foreach (@my_array_reference2) { if (ref $_ eq 'ARRAY'){print "@$_"} else {print "$_\n"} };

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh