in reply to error message in the end of the array looping?
Use the first() function from List:Util .
print +(first { $_ eq 'correct_value' } @arr) || 'not found';
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: error message in the end of the array looping?
by dank (Initiate) on Jun 01, 2006 at 07:02 UTC |
In Section
Seekers of Perl Wisdom