RE: System o/p to a varaible

2005-03-15 Thread Manav Mathur
-Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 16, 2005 12:06 AM To: Perl Beginners List Cc: Anish Kumar K. Subject: Re: System o/p to a varaible On Mar 15, Chris Devers said: >system($command) >or die "

Re: System o/p to a varaible

2005-03-15 Thread John W. Krahn
Anish Kumar K. wrote: Hi Hello, This program I use to get the last line from the log file "cipe.log". and then write the line onto a text file "a.txt" system("tail -1 cipe.log > a.txt"); open INPUT,"a.txt"; my $line=; then I open the text file and read the value from the file handle. This invloves

Re: System o/p to a varaible

2005-03-15 Thread Chris Devers
On Tue, 15 Mar 2005, Jeff 'japhy' Pinyan wrote: > On Mar 15, Chris Devers said: > > >system($command) > >or die "Couldn't run command '$command': $!"; > > That needs to be > > system($command) == 0 > or die ...; ...which is all the more reason to avoid the system command :-)

Re: System o/p to a varaible

2005-03-15 Thread Jeff 'japhy' Pinyan
On Mar 15, Chris Devers said: system($command) or die "Couldn't run command '$command': $!"; That needs to be system($command) == 0 or die ...; -- Jeff "japhy" Pinyan % How can we ever be the sold short or RPI Acacia Brother #734 % the cheated, we who for every service

Re: System o/p to a varaible

2005-03-15 Thread Felix Geerinckx
[EMAIL PROTECTED] (Anish Kumar K.) wrote in news:[EMAIL PROTECTED]: > system("tail -1 cipe.log > a.txt"); > open INPUT,"a.txt"; > my $line=; my $line = qx(tail -1 cipe.log); -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: System o/p to a varaible

2005-03-15 Thread Bob Showalter
Anish Kumar K. wrote: > Hi > > This program I use to get the last line from the log file "cipe.log". > and then write the line onto a text file "a.txt" > > system("tail -1 cipe.log > a.txt"); > open INPUT,"a.txt"; > my $line=; > > then I open the text file and read the value from the file handl

Re: System o/p to a varaible

2005-03-15 Thread Chris Devers
On Tue, 15 Mar 2005, Anish Kumar K. wrote: > This program I use to get the last line from the log file "cipe.log". > and then write the line onto a text file "a.txt" > > system("tail -1 cipe.log > a.txt"); > open INPUT,"a.txt"; > my $line=; > > then I open the text file and read the value from

Re: System o/p to a varaible

2005-03-15 Thread John Doe
Am Dienstag, 15. März 2005 01.33 schrieb Anish Kumar K.: > Hi > > This program I use to get the last line from the log file "cipe.log". and > then write the line onto a text file "a.txt" > > system("tail -1 cipe.log > a.txt"); > open INPUT,"a.txt"; > my $line=; > > then I open the text file and rea

System o/p to a varaible

2005-03-15 Thread Anish Kumar K.
Hi This program I use to get the last line from the log file "cipe.log". and then write the line onto a text file "a.txt" system("tail -1 cipe.log > a.txt"); open INPUT,"a.txt"; my $line=; then I open the text file and read the value from the file handle. This invloves cumbersome process. I ne