use strict; use warnings; my %ahash=(one=>1, two=>2, three=>3, foo=>'$foo'); print join(", ", map { "'$_' => '$ahash{$_}'"} keys %ahash ), "\n"; __END__ 'three' => '3', 'one' => '1', 'foo' => '$foo', 'two' => '2' #### use strict; use warnings; my %ahash = ( # PASTE HASH CONTENTS BELOW ); print "'$_' => '$ahash{$_}', " for keys %ahash; #### Global symbol "$foo" requires explicit package name at G:\x.pl line 6. Execution of G:\x.pl aborted due to compilation errors. #### use strict; use warnings; my %ahash=(one=>1, two=>2, three=>3); print join(", ", %ahash); __END__ three, 3, one, 1, two, 2