![]() |
|
Do you know where your variables are? | |
PerlMonks |
Re: Getting keys or values of a file based hashby Eily (Monsignor) |
on Feb 28, 2020 at 16:55 UTC ( #11113552=note: print w/replies, xml ) | Need Help?? |
Beside the fact that your code doesn't compile, there is another issue with the while loop, keys resets the iterator so each starts from the first pair each time. Your loop basically means that while you get the first key/value pair, print all the keys; which is an infinite loop. Fletch is probably right and you probably just got this frankencode while trying different ways to debug, but FYI you should avoid using keys or values inside a while(each) loop.
In Section
Seekers of Perl Wisdom
|
|