Thank you perl
A poor man’s sql select for two files that I wrote today:
#!/usr/bin/perl
%fileone = ( );
%filetwo = ( );
open(FIRST, "< $ARGV[0]") || die "Could not open $ARGV[0]";
open(SECOND, "<$ARGV[1]") || die "Could not open $ARGV[1]";
while(< FIRST >) {
$line = uc($_);
$fileone{”$line”} = 1;
}
close(FIRST);
open (OUT, “>in_both”);
while(< SECOND >) {
$line = uc($_);
if($fileone{”$line”} == 1) {
print OUT “$_”;
}
}
close(SECOND);
close(OUT);
exit;
>>