Re: where are STDERR and STDOUT of perl do "/path/to/script.pl"
Wes Hardaker <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Organization | Sparta |
| Message-ID | <[email protected]> |
>>>>> On Thu, 27 May 2010 20:38:25 +0100, Joao Ferreira gmail <[email protected]> said: JF> perl do "/path/to/script.pl" to fire-up a sub-agent... JF> Where can I find the STDOUT and STDERR of my script ? can I redirect JF> them some how ? STDOUT and STDERR get redirected to the same stdout/stderr of the agent. So run the agent with > /path/to/file for example. *But*, syntax errors aren't caught by this due to the way things are invoked by the do statement. # echo "broken here" >! /tmp/test.pl # perl /tmp/test.pl Can't locate object method "broken" via package "here" (perhaps you forgot to load "here"?) at /tmp/test.pl line 1. # perl -e "do '/tmp/test.pl';" The last command won't print an error as perl's 'do' silently eats it. -- Wes Hardaker Cobham Analytic Solutions ------------------------------------------------------------------------------ _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users