in reply to Printing a hash of arrays of arrays in one statement?
What you were doing was to dereference the array, leaving you with an array. Then ... you tried to take an array and dereference it into an array. That doesn't work as you were expecting (as I'm sure you noticed). :-)
You don't need the -> if it's a HoLoL, or whatever. But, you can leave it in if it improves readability for you.print( "$_ ", join( ', ' => @{$hoa{$_}[0]} ), "\n" ) for sort keys %hoa;
That'll get you all the way you want to go.for my $key (sort keys %hoa) { print( "$key:$_ ", join( ', ' => @{$hoa{$key}[$_]} ), "\n" ) for @{$hoa{$key}}; }
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
|
|---|