in reply to How to create a log file?
use strict; use warnings; open STDERR,">","$0.log" or die $!; ... ... warn "this goes to my log file"; ... print "but this doesn't\n"; .... [download]
mr.nick ...