programming-examples/perl/Hash/Lists the contents of an associative array using the values function.pl

8 lines
201 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/usr/local/bin/perl -w
my %cities = ("Toronto" => "East", "Calgary" => "Central", "Vancouver" => 'West');
for $value (values %cities)
{
print "Value: $value \n";
}