Re: redirecting STDERR with IO::Tee

2009-06-25 Thread Jenda Krynicky
Date sent: Mon, 22 Jun 2009 10:53:06 -0700 From: pa...@compugenic.com To: beginners@perl.org Subject:redirecting STDERR with IO::Tee > I have a script which runs mostly via a cron job and sometimes > interactively. I woul

Re: redirecting STDERR with IO::Tee

2009-06-24 Thread pablo
On Wed, Jun 24, 2009 at 05:52:36PM +0800, Jeff Pang wrote: > 2009/6/23 : > > I have a script which runs mostly via a cron job and sometimes > > interactively.  I would like STDERR to automatically print to both the > > console and to a logfile simultaneously. > > Hi, > > What causes writting

Re: redirecting STDERR with IO::Tee

2009-06-24 Thread Jeff Pang
2009/6/23 : > I have a script which runs mostly via a cron job and sometimes interactively. >  I would like STDERR to automatically print to both the console and to a > logfile simultaneously. > > Right now I've gotten as far as merging both file handles with IO::Tee but > I'm not sure if I'm h

redirecting STDERR with IO::Tee

2009-06-22 Thread pablo
I have a script which runs mostly via a cron job and sometimes interactively. I would like STDERR to automatically print to both the console and to a logfile simultaneously. Right now I've gotten as far as merging both file handles with IO::Tee but I'm not sure if I'm heading down the right p

Re: Redirecting STDERR

2005-10-07 Thread Stephen Kratzer
e "Failed to restore STDERR"; > > > -Original Message- > From: Ryan Frantz [mailto:[EMAIL PROTECTED] > Sent: Friday, October 07, 2005 12:10 PM > To: beginners@perl.org > Subject: Redirecting STDERR > > Perlers, > > I have a script where I redirec

Re: Redirecting STDERR

2005-10-07 Thread Jeff Pan
quot;Failed to restore STDERR"; > > > -----Original Message- > From: Ryan Frantz [mailto:[EMAIL PROTECTED] > Sent: Friday, October 07, 2005 12:10 PM > To: beginners@perl.org > Subject: Redirecting STDERR > > Perlers, > > I have a script where I redirect STDE

RE: Redirecting STDERR

2005-10-07 Thread Timothy Johnson
From: Ryan Frantz [mailto:[EMAIL PROTECTED] Sent: Friday, October 07, 2005 12:10 PM To: beginners@perl.org Subject: Redirecting STDERR Perlers, I have a script where I redirect STDERR to a file so that I can capture 'die' messages like so: use warnings; use strict; my $logfile

Redirecting STDERR

2005-10-07 Thread Ryan Frantz
Perlers, I have a script where I redirect STDERR to a file so that I can capture 'die' messages like so: use warnings; use strict; my $logfile = "/some/path/logfile.txt"; open STDERR, ">>$logfile"; something or die "Unable to do something()\n"; close STDERR; Is it kosher to do this? Or is t

Redirecting STDERR and STDOUT ?

2005-05-13 Thread Michael Gale
Hello, I am using the following to redirect STDERR and STDOUT: open(STDOUT, "> $logfile") || die "Can't redirect stdout"; open(STDERR, ">&STDOUT") || die "Can't dup stdout"; select(STDERR); $| = 1; # make unbuffered select(STDOUT); $| = 1; # make unbuffered .. close(STDOUT

RE: Redirecting STDERR to 2 locations simultaneously

2001-11-13 Thread Crowder, Rod
Try the Module IO::Tee, I haven't used it, but it's description sounds to be what you need > -Original Message- > From: Peter Scott [mailto:[EMAIL PROTECTED]] > Sent: 13 November 2001 07:01 > To: [EMAIL PROTECTED] > Subject: Re: Redirecting STDERR to 2

Re: Redirecting STDERR to 2 locations simultaneously

2001-11-12 Thread Peter Scott
>I have been trying to figure out if it possible to redirect STDERR to 2 >locations at once. Specifically, I want certain errors to be redirected >to both STDOUT and a log file. I have been unable to do this, and am not >even sure it is possible. > >Redirecting to one or the other is now pro

Re: Redirecting STDERR to 2 locations simultaneously

2001-11-12 Thread Peter Cline
At 05:24 PM 11/12/01 -0500, you wrote: >>I have been trying to figure out if it possible to redirect STDERR to 2 >>locations at once. Specifically, I want certain errors to be redirected >>to both STDOUT and a log file. I have been unable to do this, and am not >>even sure it is possible. >>

Redirecting STDERR to 2 locations simultaneously

2001-11-12 Thread Peter Cline
>I have been trying to figure out if it possible to redirect STDERR to 2 >locations at once. Specifically, I want certain errors to be redirected >to both STDOUT and a log file. I have been unable to do this, and am not >even sure it is possible. > >Redirecting to one or the other is now pro