E.g.
print STDERR "This didn't work as expected!\n"; [download]
In reply to Re^2: How do I output error messages to a file? by inman in thread How do I output error messages to a file? by tphyahoo