programming-examples/perl/Hash/Using values function to get all value in a hash.pl

14 lines
205 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/usr/bin/perl -w
use strict;
my %where = (
A => "AA",
B => "BB",
C => "CC",
D => "DD"
);
foreach (values %where) {
print "someone lives in $_\n";
}