#!/usr/local/bin/perl
# $ARGV[0]:  one
# $ARGV[1]:  two
# prints all the lines in both one and two.
open(one,$ARGV[0]);
if (!(-e one)) { print "intersection.pl: problem opening one\n"};
while ($oneline = <one>) {
    $found = 0;
    open(two,$ARGV[1]);
if (!(-e two)) { print "intersection.pl: problem opening two\n"};
    while (($twoline = <two>) && !$found) {
	if ($oneline eq $twoline) {
	    $found = 1;
	    last;
	}
    }
    close(two);
    if ($found) {
	print $oneline;
    }
}
close(one);

