NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
each (Score:2)
I've had this problem before. In my case, I didn't appear to be iterating over a hash properly. However, when I stuck in debugging code to dump the hash, it worked fine. When I dropped to the debugger and manually inspected the hash, it still worked. As it turns out, the problem was because I was calling each on the hash and dying if I had problems. However, I was catching the die in an eval and reentered the subroutine with correct arguments (this was in a test, so you can see why). When I reentered, each was not reset, thus causing the failure.
Reply to This