programming-examples/perl/Hash/Using each function with hash reference.pl

10 lines
168 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
$hashref = {
fruit => apple,
sandwich => hamburger,
drink => bubbly,
};
while(($key, $value) = each(%$hashref)) {
print "$key => $value\n";
}