programming-examples/perl/Hash/Using map with hash.pl

5 lines
121 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
$hash{fruit} = apple;
$hash{sandwich} = hamburger;
$hash{drink} = bubbly;
print map "$_ => $hash{$_}\n", keys %hash;