in reply to how i capture a script error to a file ?

see Parsing and translating Perl Regexes for a concise example how to temporarily redirect STDERR and restore it later. (here to a variable instead of a file)

and Re^3: Capturing STDERR using IO::Handle for even more detailed examples.

It's documented in the perldocs, but can't remember where...

edit

If you just want to redirect STDERR permanently for the lifetime of your Perl execution (beware of modperl !!!), this should do (and capture also all compilation errors)

BEGIN { close STDERR; open STDERR, ">>", "log.err"; }

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!