in reply to Printing hash
The code:
foreach my $key (sort keys %hash)
creates an anonymous array of the sorted keys in the hash %hash. The foreach is a loop construct, each iteration thru the loop sets $key to the next item in the anonymous array until the end of the array, when the loop ends.
Scott
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Printing hash
by bobf (Monsignor) on Feb 13, 2006 at 02:37 UTC | |
by CountOrlok (Friar) on Feb 13, 2006 at 05:37 UTC |