|laziness, impatience, and hubris|
error message in the end of the array looping?by Anonymous Monk
|on May 29, 2006 at 20:43 UTC||Need Help??|
Anonymous Monk has asked for the
wisdom of the Perl Monks concerning the following question:
I have an array which I read each element at a time.
Then I use the array's element as a key for a hash I have created.
If the value of the hash for the given key is correct, I stop reading the array, using 'last'.
If the value is wrong, I keep reading, using 'next'.
What I want to ask is how and where shall I place an error message that will say for example "We read the entire loop and found no matches" ? I guess I must put it somewhere after the next statements?
Imagine that I have something similar to :
Any hints? Thank you in advance!