Re: Redirecting STDOUT and STDERR for system()

2009-07-06 Thread Eric Veith
That works like a charm -- thanks! "Chas. Owens" wrote on 07/05/2009 03:57:34 AM: > From: > > "Chas. Owens" > > To: > > Eric Veith/Germany/i...@ibmde > > Cc: > > beginners@perl.org > > Date: > > 07/05/2009 03:58 AM > > Subj

Re: Redirecting STDOUT and STDERR for system()

2009-07-04 Thread Chas. Owens
On Thu, Jul 2, 2009 at 04:36, Eric Veith wrote: > > Hello List, > > as part of a Perl script of mine, I want to execute a program, get its > return code AND capture its output on both STDERR and STDOUT. I tried > IO::Handle, but that only gives me STDOUT and not the return code. Using > qr//, I can

Re: Redirecting STDOUT & STDERR

2007-05-07 Thread John W. Krahn
Karyn Williams wrote: > I have this script I have been working on where I need to redirect STDOUT > and STDERR to files at the beginning of the script and then back to default > (terminal) at the end of the script. I found an example on-line and used it > and it works, however it generates a warnin

Re: Redirecting STDOUT & STDERR

2007-05-07 Thread Tom Phoenix
On 5/7/07, Karyn Williams <[EMAIL PROTECTED]> wrote: I have this script I have been working on where I need to redirect STDOUT and STDERR to files at the beginning of the script and then back to default (terminal) at the end of the script. I found an example on-line and used it and it works, how

Re: Redirecting STDOUT & STDERR

2007-05-07 Thread Adriano Ferreira
On 5/7/07, Karyn Williams <[EMAIL PROTECTED]> wrote: I have this script I have been working on where I need to redirect STDOUT and STDERR to files at the beginning of the script and then back to default (terminal) at the end of the script. I found an example on-line and used it and it works, howe

Re: Redirecting STDOUT to an array

2006-02-12 Thread Chas Owens
On 2/12/06, Ron Smith <[EMAIL PROTECTED]> wrote: snip > Yeah, I deserve it. Giving the whole story in the beginning would have been > better. But, > hey I'm JAPH and laziness is a virtue in that case. :-) Anyway the "push" > does just fine. snip There is a difference between laziness (a sin) and

Re: Redirecting STDOUT to an array

2006-02-12 Thread Ron Smith
Tom Phoenix <[EMAIL PROTECTED]> wrote: Inexplicably, Ron Smith seems to have written: > Yes, you are right. I probably should post the rest of the story at this > point: > and I'd like to generate a row of asterisks, based on the number stored in > $firstBar. I thought of printing to a file th

Re: Redirecting STDOUT to an array

2006-02-12 Thread Tom Phoenix
Inexplicably, Ron Smith <[EMAIL PROTECTED]> seems to have written: > Yes, you are right. I probably should post the rest of the story at this > point: > and I'd like to generate a row of asterisks, based on the number stored in > $firstBar. I thought of printing to a file then splitting the co

Re: Redirecting STDOUT to an array

2006-02-12 Thread Ron Smith
Tom Phoenix <[EMAIL PROTECTED]> wrote: On 2/12/06, Ron Smith wrote: > How would I redirect the output of the print line to an array instaed of > STDOUT? > > my $firstBar = 5; > print "*" while $firstBar, $firstBar--; You would write some Perl code that puts something into an array, and you woul

Re: Redirecting STDOUT to an array

2006-02-12 Thread Ron Smith
Sky Blueshoes <[EMAIL PROTECTED]> wrote: Ron Smith wrote: >Hi all, > > How would I redirect the output of the print line to an array instaed of > STDOUT? > > my $firstBar = 5; > print "*" while $firstBar, $firstBar--; > > I've looked in several places, including the Camel Book and the Cookboo

Re: Redirecting STDOUT to an array

2006-02-12 Thread Tom Phoenix
On 2/12/06, Ron Smith <[EMAIL PROTECTED]> wrote: > How would I redirect the output of the print line to an array instaed of > STDOUT? > > my $firstBar = 5; > print "*" while $firstBar, $firstBar--; You would write some Perl code that puts something into an array, and you would use that in

Re: 're'-redirecting STDOUT back to STDOUT after writing to a file

2004-11-26 Thread Matthias Kraatz
Octavian Rasnita wrote: Use select() function. Read perldoc -f select Teddy - Original Message - From: "Matthias Kraatz" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, November 27, 2004 12:20 AM Subject: 're'-redirecting STDOUT back to ST

Re: 're'-redirecting STDOUT back to STDOUT after writing to a file

2004-11-26 Thread Octavian Rasnita
Use select() function. Read perldoc -f select Teddy - Original Message - From: "Matthias Kraatz" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, November 27, 2004 12:20 AM Subject: 're'-redirecting STDOUT back to STDOUT after writing to a

Re: 're'-redirecting STDOUT back to STDOUT after writing to a file

2004-11-26 Thread Gunnar Hjalmarsson
Matthias Kraatz wrote: in a cgi-script I wanted to prevent an executable that I call from within the script from dumping output directly to the webpage. This worked fine with 'open(STDOUT,">something-log.txt")'. But now I want to write to the webpage again. 'open(STDOUT,">&STDOUT")' does not only l

're'-redirecting STDOUT back to STDOUT after writing to a file

2004-11-26 Thread Matthias Kraatz
Hi, this might be a really stupid question. But, in a cgi-script I wanted to prevent an executable that I call from within the script from dumping output directly to the webpage. This worked fine with 'open(STDOUT,">something-log.txt")'. But now I want to write to the webpage again. 'open(STD

Re: Redirecting STDOUT

2002-09-19 Thread Jenda Krynicky
From: "Troy May" <[EMAIL PROTECTED]> > I'm writing a script that is currently interactive ( once I'm done > debugging it will be non-interactive) in that I have to tell it to > keep processing data after the end of every pass. I'm looking for a > way to display the script's outp

RE: Redirecting STDOUT

2002-09-05 Thread Timothy Johnson
Message- From: Troy May [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 05, 2002 8:19 PM To: Wiggins d'Anconia Cc: Perl Beginners Subject: RE: Redirecting STDOUT I think I found it! Read this: |tee - Tee allows for the stdout to be sent to both the screen and to a file "comm

Re: Redirecting STDOUT

2002-09-05 Thread Ramprasad A Padmanabhan
Troy May wrote: > I'm writing a script that is currently interactive ( once I'm done debugging > it will be non-interactive) in that I have to tell it to keep processing > data after the end of every pass. I'm looking for a way to display the > script's output on my screen, but also to log it to a

RE: Redirecting STDOUT

2002-09-05 Thread Troy May
To: Troy May Cc: Perl Beginners Subject: Re: Redirecting STDOUT You could open a file from within the script, then for each of your prints, print both to the open filehandle and also to standard out. This should work though I would imagine (hope) there is a better way. http://danconia.org Troy M

Re: Redirecting STDOUT

2002-09-05 Thread Wiggins d'Anconia
You could open a file from within the script, then for each of your prints, print both to the open filehandle and also to standard out. This should work though I would imagine (hope) there is a better way. http://danconia.org Troy May wrote: > I'm writing a script that is currently interactive