Re: Redirecting the output

2010-12-01 Thread Robert Wohlfarth
On Tue, Nov 30, 2010 at 6:28 PM, David Christensen < dpchr...@holgerdanske.com> wrote: > Sooraj S wrote: > > Can i redirect the output to a file as well as stdout at the same > > time...i dont want to use tee command..i want this to be done in my > > perl program itself... > > Jim Gibson wrote: >

答复: Redirecting the output

2010-11-30 Thread gaochong
IO::Tee > -邮件原件- > 发件人: Sooraj S [mailto:soorajspadmanab...@gmail.com] > 发送时间: 2010年11月日 23:14 > 收件人: beginners@perl.org > 主题: Redirecting the output > > Hi, > > Can i redirect the output to a file as well as stdout at the same time...i dont want > to use

Re: Redirecting the output

2010-11-30 Thread David Christensen
Sooraj S wrote: > Can i redirect the output to a file as well as stdout at the same > time...i dont want to use tee command..i want this to be done in my > perl program itself... Jim Gibson wrote: Install and use the File::Tee module from CPAN: I researched the various options a while back and

Re: Redirecting the output

2010-11-30 Thread Jim Gibson
On 11/30/10 Tue Nov 30, 2010 7:13 AM, "Sooraj S" scribbled: > Hi, > > Can i redirect the output to a file as well as stdout at the same > time...i dont want to use tee command..i want this to be done in my > perl program itself... > > open STDOUT, '>' , 'log.txt''; > > By including this in m

Redirecting the output

2010-11-30 Thread Sooraj S
Hi, Can i redirect the output to a file as well as stdout at the same time...i dont want to use tee command..i want this to be done in my perl program itself... open STDOUT, '>' , 'log.txt''; By including this in my perl program i can redirect my output to log.txt. But i want my output to be dis

Re: Redirecting the Output and Error of Perl script

2010-05-01 Thread Shawn H Corey
Parag Kalra wrote: Thanks all... I was printing in normal fashion. I should have used something lik: print STDERR "stderr\n"; as suggested by all. Perhaps you should be using warn and die: warn "This appears on STDERR\n"; -- Just my 0.0002 million dollars worth, Shawn Programming

Re: Redirecting the Output and Error of Perl script

2010-05-01 Thread Parag Kalra
Thanks all... I was printing in normal fashion. I should have used something lik: print STDERR "stderr\n"; as suggested by all. Cheers, Parag On Sat, May 1, 2010 at 1:55 AM, Philip Potter wrote: > On 30 April 2010 18:45, Parag Kalra wrote: > > Hey All, > > > > I am trying to execute a Perl

Re: Redirecting the Output and Error of Perl script

2010-05-01 Thread Philip Potter
On 30 April 2010 18:45, Parag Kalra wrote: > Hey All, > > I am trying to execute a Perl via shell script. I want to redirect output of > Perl script to one file and error occured (if any) to other file. > > This is the snippet from my shell script: > > perl output_error.pl 1>> Report.log 2>>Error.

Re: Redirecting the Output and Error of Perl script

2010-04-30 Thread Harry Putnam
Parag Kalra writes: > Hey All, > > I am trying to execute a Perl via shell script. I want to redirect output of > Perl script to one file and error occured (if any) to other file. > > This is the snippet from my shell script: > > perl output_error.pl 1>> Report.log 2>>Error.log > > However even n

Redirecting the Output and Error of Perl script

2010-04-30 Thread Parag Kalra
Hey All, I am trying to execute a Perl via shell script. I want to redirect output of Perl script to one file and error occured (if any) to other file. This is the snippet from my shell script: perl output_error.pl 1>> Report.log 2>>Error.log However even normal print messages are going to Erro

Re: redirecting the output of a command to a file

2003-08-26 Thread John W. Krahn
Ivan Novick wrote: > > Hi, Hello, > does anyone know syntax to run a command and redirect its output directly to > a file? > > Equivalent to myCommand > myFile in shell open my $pipe, 'myCommand |' or die "Cannot open pipe from myCommand: $!"; open my $fh, '>', 'myFile' or die "Cannot open myF

Re: redirecting the output of a command to a file

2003-08-26 Thread Rob Dixon
Marcos Rebelo wrote: > > What is your real problem? > Exactly. Using Perl as an agent to simply run a program and record its output is misuse. Just use a shell script. What are you trying to do? /R -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTEC

RE: redirecting the output of a command to a file

2003-08-26 Thread Marcos . Rebelo
ECTED]'; [EMAIL PROTECTED] Subject: RE: redirecting the output of a command to a file Is there no other way some perl syntax to redirect to a file the output of a command? -Original Message- From: [EMAIL PROTECTED] [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ]

RE: redirecting the output of a command to a file

2003-08-26 Thread Ivan Novick
Is there no other way some perl syntax to redirect to a file the output of a command? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 26, 2003 7:14 AM To: Ivan Novick; [EMAIL PROTECTED] Subject: RE: redirecting the output of a command to a file

RE: redirecting the output of a command to a file

2003-08-26 Thread Marcos . Rebelo
system("myCommand > myFile"); must work -Original Message- From: Ivan Novick [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 26, 2003 1:11 PM To: [EMAIL PROTECTED] Subject: redirecting the output of a command to a file Hi, does anyone know syntax to run a command and

redirecting the output of a command to a file

2003-08-26 Thread Ivan Novick
Hi, does anyone know syntax to run a command and redirect its output directly to a file? Equivalent to myCommand > myFile in shell Thanks, Ivan