Open this and then call the block for every line of the resulting file handle, closing the file at the end.
Ok, I see. How about this one?
This seems to work and it is semantically much closer to what you proposed: it opens the file, calls print
(which is not a block, but I think, it could be made one for no good) for each requested line.
It is an interesting question, whether we could omit the parentheses around =<>. Although Pugs does not seem to like it, I am not entirely sure that  should bind so tight.