in reply to Extract ranges of lines from a file, saving each range to a separate file

Hello perlato,

First, you need to open the output file before the while loop. Second, you need to change:

print $_;

to:

print $ofh $_;

Note: Do not put a comma between the output filehandle and the (first) item to be printed. See print.

Hope that helps,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,