in reply to Printing an Hash
This should keep all of your indentation, though Im not aware of how you want it printed out, so I just put each key and value on a newline
use v5.14; my %hash = (' key' => 'value ',"\tkey2" => "value2\t"); open(FILE,'>>','filename') or die "$!"; while ( my($key, $value ) = each(%hash)){ print "$key\n$value\n"; print FILE "$key\n$value\n"; } close FILE;
In Section
Seekers of Perl Wisdom