# no redirection C:\>perl -e "warn 'foo'" foo at -e line 1. # redirect STDERR to FILE (often /dev/null :-) C:\>perl -e "warn 'foo'" 2> out C:\>type out foo at -e line 1. # redirect STDERR to STDOUT C:\>perl -e "warn 'foo'" 2>&1 foo at -e line 1. # redirect STDERR to STDOUT and STDOUT to FILE C:\>perl -e "warn 'foo';print 'bar'">out 2>&1 C:\>type out foo at -e line 1. bar