programming-examples/perl/Hash/Using each to get key and value pair from hash.pl
2019-11-15 12:59:38 +01:00

7 lines
123 B
Perl

$hash2{A} = F;
$hash2{B} = E;
$hash2{'C'} = D;
while(($key, $value) = each(%hash)) {
print "$key => $value\n";
}