Looping Over A Hash : Hash Loop « Hash « Perl
- Perl
- Hash
- Hash Loop
Looping Over A Hash
#!/usr/bin/perl
use warnings;
use strict;
my %where=(
G => "g",
L => "l",
I => "i",
S => "s"
);
for (keys %where) {
print "$_ lives in $where{$_}\n";
}
Related examples in the same category