Help for this page

Select Code to Download


  1. or download this
        my %b_hash = map { $_ => 1 } @b_array;
        my @new_array = grep $b_hash{$_}, @a_array;
    
  2. or download this
        my %b_hash;
           $b_hash {$_} ++ for @b_array;
        my @c_array = map {($_) x ($b_hash {$_} || 0)} @a_array;