Help for this page

Select Code to Download


  1. or download this
    # for loop
    for my $i (0 .. $#a1) {
    ...
                if $a2[$j] eq $a1[$i];
        }
    }
    
  2. or download this
    # schwartzian [sp?] transform (perhaps not a paradigmatic example thou
    +gh)
    my @indicies = map {$_->[0]}
        grep {$a1[$_->[0]] eq $a2[$_->[1]]}
        map { my $l = $_; (map {[$l,$_]} 0 .. $#a2) } 0 .. $#a2;