Help for this page

Select Code to Download


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