Lists the contents of an associative array using the values function: : value « Hash « Perl
- Perl
- Hash
- value
Lists the contents of an associative array using the values function:
#!/usr/local/bin/perl -w
my %cities = ("Toronto" => "East", "Calgary" => "Central", "Vancouver" => 'West');
for $value (values %cities)
{
print "Value: $value \n";
}
Related examples in the same category