in reply to Re^2: Extracting a block of text between start and end point
in thread Extracting a block of text between start and end point

I normally write my IO scripts to take files on the command line, and output to STDOUT. (That makes the script a filter, and all kinds of wonderful proceed from there.)

So instead of opening an output file, and instead of looping over a list of files, do this:

while (<>) { do_something_here(); print $blah if $accepted; }

Then you run it like so:

my_script blah*.log > my_output_file

-QM
--
Quantum Mechanics: The dreams stuff is made of