in reply to using warn instead or print STDERR?
No message is printed if there is a $SIG{__WARN__} handler installed.
Update: another subtle difference is that you get line info if you leave off the newline in warn (not sure why):
use strict; use warnings; print STDERR "print\n"; warn "warn with newline\n"; warn "warn without newline"; __END__ print warn with newline warn without newline at z line 11.
|
|---|