Use grep with ^ and $ to match exactly 1
Update:if (my ($matched) = grep /^1$/, @array) { print "found it: $matched\n"; }
Corrected the code as marked by Bloodnok
In reply to Re: Foreach loop
by vinoth.ree
in thread Foreach loop
by PetreAdi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |