if(in($var,$array)) { print "Yes!!!!"; } else { print "No!!!"; } sub in { my $var = shift; my $ref = shift; foreach (@{$ref}) { if($var == $_) { return 1; } } return 0; }
In reply to Re: Is there an InString-like function?
by simon.proctor
in thread Is there an InString-like function?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |