in reply to Clearing lines in a file based on an array containing the lines
When you put the names of the fields in a hash
my %erasethese = map { $_ => 1 } qw(structuralObjectClass entryUUID creatorsName modifiersName createT +imestamp modifyTimestamp entryCSN);
you can then write
print FILE $LINE unless exists $erasethese{$array[0]};
which would test if $array[0] is any of the keywords (which - if I've understood you correctly - is what you want to achieve).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Clearing lines in a file based on an array containing the lines
by Anonymous Monk on Apr 22, 2009 at 20:54 UTC |