in reply to Weird file extraction problem
Try perhaps this:
print OUTPUT $1 and last if /(.*)END/; [download]