in reply to remove a line

Well, let me 1st say something about speed. This thing is gonna be slow. Perhaps you could try something like this:
my %match; if (open (FH1, "first.txt")) { while (<FH1>) { if (/^\s+(\S+)/) { $match{$1} = 1; print "Found $1\n"; } } close (FH1); } if (open (FH2, "data.txt")) { while (<FH2>) { if (/^\s+\S+\s+\S+\s+(\S+)/) { if ($match{$1}) { print "Match on $1\n"; } else { print "NO match on $1\n"; } } } close (FH2); }
code is untested.

Replies are listed 'Best First'.
Re^2: remove a line
by Anonymous Monk on Nov 22, 2004 at 10:24 UTC
    thanks, seems to have done the job