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

Re: output of a command to a file

2001-07-24 Thread Abdulaziz Ghuloum
Hello, There is nothing wrong in your perl program. The problem is that not all nic servers produce the same output. The line with "created on" exists for some names only, not all. I tried yahoo.com which had it and netscape.com which didn't have it. So, you should figure out a better way to

RE: output of a command to a file

2001-07-24 Thread Venkat Mohan
nners Subject: output of a command to a file Hello everyone, How can I take the output of a command, put into a scalar, and then put it into a file? Here's a portion of what I have: open(FP, ">>$outfile"); my $command = `whois $h | grep 'created on'`; print "$co

RE: output of a command to a file

2001-07-24 Thread Steve Swords
the man page for the open() function has a section on doing exactly what your asking for... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

output of a command to a file

2001-07-24 Thread Tyler Longren
Hello everyone, How can I take the output of a command, put into a scalar, and then put it into a file? Here's a portion of what I have: open(FP, ">>$outfile"); my $command = `whois $h | grep 'created on'`; print "$command"; print FP "$h $command\n"; The above code doesn't work though. There's