programming-examples/perl/Statement/Using foreach statement with hash.pl
2019-11-15 12:59:38 +01:00

7 lines
138 B
Perl

$hash{fruit} = orange;
$hash{sandwich} = club;
$hash{drink} = lemonade;
foreach $key (keys %hash) {
print $hash{$key} . "\n";
}