check if an element exists in array
Update:
I used one of my project this way!
Similar to if ( "value" ~~ @array ) but seems more explicit.if ( grep( /^$value$/, @array ) ) { print "found it"; }
In reply to Re: How to check whether my array contains element x
by vinoth.ree
in thread How to check whether my array contains element x
by sandeepda
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |