Help for this page

Select Code to Download


  1. or download this
    sub indices {
        my $match = shift;
    
        my $i = 0;
        map { $i++; $_ eq $match ? $i : () } @_
    }
    
  2. or download this
    sub indices {
        my $match = shift;
        grep $_[$_] eq $match, 0 .. $#_
    }