How about:
eval {print FILE <<UNTIL_I_SAY_STOP; blah, blah, blah UNTIL_I_SAY_STOP }; $@ && die "$@";
That assumes $|=1;. If autoflush is not on you'll see errors on close rather than after print.
After Compline,
Zaxo
In reply to Re: print or die
by Zaxo
in thread print or die
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |