in reply to Output only certain fields from a hash using the Data::Dumper
print Dumper { %hash {qw{ a b c }} };
In older Perls, you have to use a loop (or disguise it as map):
print Dumper { map { $_, $hash{$_} } qw( a b c ) };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Output only certain fields from a hash using the Data::Dumper
by MrSnrub (Beadle) on Jan 07, 2015 at 16:16 UTC |