Or more commonly, redirect at the shell:
perl -le 'open AA, ">test.txt"; warn "Hello"; print AA "foo\n";' 2> +/dev/null
In reply to Re^2: Using warn() when STDERR is closed
by derby
in thread Using warn() when STDERR is closed
by akeyes
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |