Help for this page

Select Code to Download


  1. or download this
    my $count = scalar grep { $array1ref->[$_] eq $array2ref->[$_] } 0 .. 
    +$#$array1ref;
    
  2. or download this
    $ perl -E 'my ($a1, $a2) = ([1,2,3],[1,3,3]); say scalar grep {$a1->[$
    +_] == $a2->[$_]} 0..$#$a1'
    2