On Aug 10, Jeff 'japhy/Marillion' Pinyan said:

>  my %freq;
>  $freq{$_}++ for @list2;  # create a hash of key -> frequency
>
>  for (@list1) {
>    print $freq{$_} if $freq{$_} > 1;
>  }

Rather,

  print $_ if $freq{$_} > 1;

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to