in reply to remove a line
code is untested.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); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: remove a line
by Anonymous Monk on Nov 22, 2004 at 10:24 UTC |