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


in reply to Re^3: Can't write files (even redirected from shell)
in thread Can't write files (even redirected from shell)

This is a nice boilerplate use of perl -x to make this into a polyglot batch file. I especially liked the following batch line:
if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul

--
[ e d @ h a l l e y . c c ]