Re: Capturing stdout and stderr without redirection

2007-01-19 Thread Peter Scott
On Thu, 18 Jan 2007 20:28:42 -0600, David Moreno Garza wrote: > On Thu, 2007-01-18 at 07:11 -0800, Peter Scott wrote: >> my $output = `myperlscript.pl 2>&1`; >> send_email($output) if $output; > > Isn't send_email($output) in this situation still going to happen? I > mean, even of there is not out

Re: Capturing stdout and stderr without redirection

2007-01-18 Thread David Moreno Garza
On Thu, 2007-01-18 at 07:11 -0800, Peter Scott wrote: > my $output = `myperlscript.pl 2>&1`; > send_email($output) if $output; Doubt: Isn't send_email($output) in this situation still going to happen? I mean, even of there is not output on "myperlscript.pl 2>&1", $output is going to be set, meani

RE: Capturing stdout and stderr without redirection

2007-01-18 Thread Dan Fish
nts. Bingo! Works perfectly! Thanks again -Dan -Original Message- From: Igor Sutton [mailto:[EMAIL PROTECTED] Sent: Thursday, January 18, 2007 2:31 AM To: Dan Fish Cc: beginners@perl.org Subject: Re: Capturing stdout and stderr without redirection Hi Dan, 2007/1/18, Dan F

Re: Capturing stdout and stderr without redirection

2007-01-18 Thread Peter Scott
On Wed, 17 Jan 2007 23:44:57 -0700, Dan Fish wrote: > I've got a perl wrapper that conditionally runs another perl program using > system() > > If( some_condition_applies){ > > system("myperlscript.pl"); > > } > > myperlscript.pl will complete silently if everything runs right, but > beca

Re: Capturing stdout and stderr without redirection

2007-01-18 Thread Igor Sutton
Hi Dan, 2007/1/18, Dan Fish <[EMAIL PROTECTED]>: I've got a perl wrapper that conditionally runs another perl program using system() Something like: If( some_condition_applies){ system("myperlscript.pl"); } myperlscript.pl will complete silently if everything runs right, but becaus

Re: Capturing stdout and stderr without redirection

2007-01-18 Thread Ken Foskey
On Wed, 2007-01-17 at 23:44 -0700, Dan Fish wrote: > I've got a perl wrapper that conditionally runs another perl program using > system() > > IF there is any output from myperlscript.pl, I'd like to capture it and send > it off in an email. The sending in an email part I can handle. and I thin

Capturing stdout and stderr without redirection

2007-01-17 Thread Dan Fish
I've got a perl wrapper that conditionally runs another perl program using system() Something like: If( some_condition_applies){ system("myperlscript.pl"); } myperlscript.pl will complete silently if everything runs right, but because it reads some data files and interfaces to a my