Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
however it only appears to match the first value in the array and nothing else, when it should. I have checked the array to make sure values are storedwhile (<IN>) { chomp; /^\s+(\S+)/; push @array, $1; } close (IN); foreach $line (@array) { chomp; print "$line\n"; foreach $line2 (<IN2>) { $line2 =~/^\s+\S+\s+\S+\s+(\S+)/; if ($line == $1) {remove line}; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: remove a line
by Jaap (Curate) on Nov 22, 2004 at 10:07 UTC | |
by Anonymous Monk on Nov 22, 2004 at 10:24 UTC |