in reply to Weird hash behavior
Try changing the equals sign to a comma in this line:
while (($k,$v) = each (%messages))Then it should work.
The each function returns a 2-element list in a list context, but just the key otherwise.
What you were doing there was assinging $v to $k (when $v was undefined), and then assinging the key to $k.
As a result, $v was never assigned a value.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Weird hash behavior
by RichardH (Sexton) on Oct 11, 2000 at 19:46 UTC |