On 24 Oct 2002 at 13:41, Anders Bogdan wrote:
> Kind of a newbie-ish question I guess. I could not find a good answer in
> the faq or the Perl DBI book.

Hi Anders,

Since noone else has taken a stab, I'll jump in and see if I can offer an 
alternative. However, my first thought would have been to do what you have 
done and I cannot see any problem with that. What concerns you about 
redirecting STDERR for a couple of lines?

If you're using the command-line tool vacuumdb, one option would be to use 
an open command that redirects the output from STDERR to STDOUT. In bash, 
I think it would be something like the following:
        open(FILE, "vacuumdb 2>&1|");
        while (<FILE>) { $output .= $_ }
        close FILE;

See Recipe 16.1 in _Perl Cookbook_ or open for more info. Also, what about 
running the vacuum via an SQL statement? Would the output come back 
through DBI or is this how you are doing it already?

Good luck,
William

-- 
 Lead Developer
 Knowmad Services Inc. || Internet Applications & Database Integration
 http://www.knowmad.com
 

Reply via email to