in reply to read multi lines of a file in perl

How about something like:
my $printing; while(<WORDLIST>) { $printing = 0 if (/^end process/); print if ($printing); $printing = 1 if (/^process/); }
You can move the "print if ($printing);" line around a little to influence whether the starting or ending lines should be printed, too.