> I did the 'in' function for seeing if one element is inside on list like.
>
> sub in {
> my $match = shift;
> foreach (@_) {
> return 1 if $match eq $_;
> }
> return 0;
> }
>
> so I'm calling the function like
>
> if(in($x => (1,2,3))) {
> ...
> };
>
While I realize your question is more about creating operators, etc.
Would 'grep' not work the same as the above?
perldoc -f grep
http://danconia.org
--
Boycott the Sugar Bowl! You couldn't pay me to watch that game.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>