in reply to Re: Using warn() when STDERR is closed
in thread Using warn() when STDERR is closed

Or more commonly, redirect at the shell:

perl -le 'open AA, ">test.txt"; warn "Hello"; print AA "foo\n";' 2> +/dev/null

-derby

Replies are listed 'Best First'.
Re^3: Using warn() when STDERR is closed
by shawnhcorey (Friar) on Jul 16, 2010 at 15:29 UTC

    Not everyone runs Linux.

    It's a sad, sad world we live in. :(

      What is the relation of I/O redirection from a shell to Linux? I/O redirection is a shell feature, not a Linux feature. In this form, it is at least available on EVERY Unix derivate, on any Windows version derived from NT, on OS/2, and, to a lesser extend (no redirection of STDERR), on DOS and any Windows version derived from Windows 95.

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)