You can move the "print if ($printing);" line around a little to influence whether the starting or ending lines should be printed, too.my $printing; while(<WORDLIST>) { $printing = 0 if (/^end process/); print if ($printing); $printing = 1 if (/^process/); }
In reply to Re: read multi lines of a file in perl
by flamewise
in thread read multi lines of a file in perl
by sharan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |