my %count; while (my $line_1 = <$INFILE_1>){ $line_1 =~ s/\s+$//; $count{$line_1}++; } while (my $line_2 = <$INFILE_2>){ $line_2 =~ s/\s+$//; print $line_2, "\n" if $count{$line_2}; } # untested
In reply to Re: is there a more simple way to have the intersection of two lists ?
by moritz
in thread is there a more simple way to have the intersection of two lists ?
by steph_bow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |