Welcome to the Monastery | |
PerlMonks |
Re: problem with foreach statementby sk (Curate) |
on Dec 31, 2005 at 21:19 UTC ( [id://520191]=note: print w/replies, xml ) | Need Help?? |
You are looping 8 times. You are printing it is new error before you check all possible elements. I have modified your code to fix this issue. Second part of the code is using a hash. It is much better way to check if elements are present.
Output
update: fixed typo
In Section
Seekers of Perl Wisdom
|
|