http://www.perlmonks.org?node_id=454367


in reply to Re^3: Testing failures: How to override print to make it fail?
in thread Testing failures: How to override print to make it fail?

I'm not quite sure how STDOUT or STDERR runs out of space
$ script.pl orig.txt 2> /var/log/errors.log > new.txt && rm new.txt