in reply to How to check whether my array contains element x
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"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to check whether my array contains element x
by tobyink (Canon) on Jan 17, 2013 at 13:24 UTC | |
by vinoth.ree (Monsignor) on Jan 18, 2013 at 05:31 UTC | |
|
Re^2: How to check whether my array contains element x
by MidLifeXis (Monsignor) on Jan 17, 2013 at 13:33 UTC | |
|
Re^2: How to check whether my array contains element x
by Your Mother (Archbishop) on Jan 17, 2013 at 20:26 UTC |