But this doesn't work as it prints the message out several times. I just want it to print the message once if the text i enter doesn't match any of the array elements.foreach (@array) { if ($text ne $_) { print "doesn't exist!"; } }
thanks for your help!
In reply to Re^2: does not exist in an array
by Anonymous Monk
in thread does not exist in an array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |