CPU: Perl, Fall 2005 Perl, Week 4: More Arrays, Context, Subroutines, Lexical Variables #50

Iterating Through Hashes

while ( my ($name, $prop) = each %fruit ) {
    print "An $name is $prop.\n";
}
Copyright © 2005 Ian Langworth