in reply to Re: Piping STDOUT
in thread Piping STDOUT

Also, this will capture both STDOUT and STDERR:

$output = `sc \\\\$(hostname) stop SNMP 2>&1`

note: works in Linux/Unix systems

Replies are listed 'Best First'.
Re: Re: Re: Piping STDOUT
by Helter (Chaplain) on Oct 02, 2002 at 13:58 UTC
    The above works, good thing I re-checked before posting, here is a node that has quite a few links on this subject:
    Catching STDERR with open (
    Just in case you need more ways to do it.