- or download this
sub in_list {my $target=shift; return 0+grep { $_ eq $target } @_}
- or download this
sub in_list {my $target=shift; $_ eq $target and return 1 for @_; retu
+rn}
- or download this
sub find_first_index {
my $target=shift;
...
$i++ while $_[$i] ne $target;
return $i==$#_ ? undef : $i
}