Perlfunc: in_array()  

sub in_array { my $needle = shift(); my @haystack = @_; foreach my $l(@haystack) { #print "$l => $needle\n"; if ($l == $needle) { return $needle; } } return 0; }
Leave A Reply
All content licensed under the Creative Commons License