in reply to Re: read multi lines of a file in perl
in thread read multi lines of a file in perl
while(<WORDLIST>) { next if /^process/ or /^end process/; print; }
You could consider combining the two matches into one (I would also use unless but I know that's not to everyone's taste).
while( <WORDLIST> ) { print unless m{^(?:end\s)?process}; }
I hope this is of interest.
Cheers,
JohnGG
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: read multi lines of a file in perl
by gwadej (Chaplain) on Nov 05, 2008 at 17:39 UTC |