|Just another Perl shrine|
Clearing lines in a file based on an array containing the linesby rycher (Acolyte)
|on Apr 22, 2009 at 20:16 UTC||Need Help??|
rycher has asked for the
wisdom of the Perl Monks concerning the following question:
I'm trying to simplify my subroutine that is supposed to open an (LDIF)text file, read in its contents into an array then print to a new file while excluding the lines that exist in another array.
I can currently accomplish this with just the word I want to exclude, but of course this leads to bloated code because I have to continuously open and close the file on each removal.
Here is what I have so far:
I would like to combine all of them into one open/close. I've tried a nested for-loop that incremented with no luck.
Any help would be appreciated.