in reply to help with a hash of arrays.
while( my( $key, $value ) = each %db_stru ) { print "$key contains tables:\n"; print "\t$_:" foreach @{$value}; }
Then there's always the philosophy of 'print seldom, and print late.'
while( my( $key, $value ) = each %db_stru ) { my $out = "$key contains tables:\n"; $out .= "\t$_:" foreach @{$value}; print "$out\n"; }
And for those who like to use special variables instead of explicit loops:
{ local $" = ":\t"; while( my( $key, $value ) = each %db_stru ) { print "$key contains tables:\n\t@{$value}\n" } }
Enjoy!
Dave
|
|---|