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
In reply to Re^2: read multi lines of a file in perl
by johngg
in thread read multi lines of a file in perl
by sharan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |