in reply to Weird file extraction problem

Hi Ni,

Try perhaps this:

print OUTPUT $1 and last if /(.*)END/;