Help for this page

Select Code to Download


  1. or download this
    my @a1 = qw( A B );
    my @a2 = qw( A B C D A D B A C );
    ...
        my $count = grep /^$el$/, @a2;
        print "$el is in Array2 $count times\n";
    }
    
  2. or download this
    A is in Array2 3 times
    B is in Array2 2 times