- To: coders@xxxxxxxxxxx
- Subject: Re: [coders] Silencing STDERR in Perl
- From: Ken Foskey <foskey@xxxxxxxxxxxxxxxx>
- Date: Sat, 23 Dec 2006 18:00:12 +1100
On Fri, 2006-12-22 at 09:48 +1100, Carlo Sogono wrote:
> I've got a script that uses a module which dies and shouts at stderr
> during an error. I can catch these errors nicely with eval but I want to
> do something about what it spews at at stderr...basically print my own
> customised error. Editing the Perl module would be a quick fix but I'd
> rather not do that as I'll be deploying this code on different machines.
>
> So, is there any way to silence stderr from within a perl script (no
> shell redirections to /dev/null please)?
look up system2 in cpan. Looks interesting.