in reply to Re^2:problem using foreach and each with hash ref
in thread problem using foreach and each with hash ref
An example like this is also mentioned in the documentation for each. tilly already explained the reason your loop ends after the first key and value.while (($key, $value) = each %$hash_ref) { # do something... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: What is happening ?
by vinoth.ree (Monsignor) on Aug 19, 2009 at 06:12 UTC | |
by ikegami (Patriarch) on Aug 19, 2009 at 14:38 UTC | |
by grizzley (Chaplain) on Aug 19, 2009 at 08:11 UTC | |
by Anonymous Monk on Aug 19, 2009 at 08:56 UTC | |
by grizzley (Chaplain) on Aug 19, 2009 at 10:31 UTC |