programming-examples/perl/Hash/Each function.pl
2019-11-15 12:59:38 +01:00

9 lines
225 B
Perl

#!/usr/local/bin/perl -w
my %cities = ("Toronto" => "East", "Calgary" => "Central", "Vancouver" => 'West');
while ( ($key, $value) = each %cities )
{
print "Key: $key Value: $value \n";
}