in reply to Pummeled by Broken Pipes

Try this: $SIG{PIPE} = sub { die "Got SIGPIPE" }; Now when your script gets a SIGPIPE, it should die out of the eval.