|
|
| more useful options | |
| PerlMonks |
Re: how to avoid opening and closing filesby pvaldes (Hermit) |
| on Jun 18, 2012 at 18:19 UTC ( #976870=note: print w/ replies, xml ) | Need Help?? |
|
Can I just open once a file and remove all lines together having words stored in words.txt? See map and grep (and specially "grep (!/regex/) the_file", where regex should match words stored in words.txt
I guess that a hash (%X) could be better here, but if you want an array, think in an unique sorted list or so. The idea is to avoid duplicates.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||