programming-examples/perl/Statement/Using while loop with each.pl
2019-11-15 12:59:38 +01:00

15 lines
216 B
Perl

#!/usr/bin/perl -w
use strict;
my %where = (
G => "A",
L => "B",
I => "C",
S => "D"
);
my($k, $v);
while (($k, $v) = each %where) {
print "$k lives in $v\n";
}