RE: printing output of ping command -- New question at bottom.

2005-02-24 Thread Tyson Sommer
> -Original Message- > From: John W. Krahn [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 23, 2005 2:50 PM > To: Perl Beginners > Subject: Re: printing output of ping command -- New question > at bottom. > > Tyson Sommer wrote: > > > > Th

RE: printing output of ping command -- New question at bottom.

2005-02-24 Thread Tyson Sommer
> -Original Message- > From: Chris Devers [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 23, 2005 1:18 PM > To: Tyson Sommer > Cc: 'Perl Beginners List' > Subject: Re: printing output of ping command -- New question > at bottom. > > On

Re: printing output of ping command -- New question at bottom.

2005-02-23 Thread John W. Krahn
Tyson Sommer wrote: This might be a question for beginners-cgi, but since it was mentioned here... I tried to use Net::Ping in a CGI script and it said I didn't have permissions to run ping. I can execute the section of the CGI script with the call to Net::Ping just fine from the cmd line as a regu

Re: printing output of ping command -- New question at bottom.

2005-02-23 Thread Chris Devers
On Wed, 23 Feb 2005, Tyson Sommer wrote: > This might be a question for beginners-cgi, but since it was mentioned > here... Sounds like it, but oh well. This doesn't really fix your problem so much as your error handling, but why aren't you catching the reason your script dies? Instead of

printing output of ping command -- New question at bottom.

2005-02-23 Thread Tyson Sommer
> -Original Message- > From: Chris Devers [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 23, 2005 10:14 AM > To: TapasranjanMohapatra > Cc: Perl Beginners List > Subject: Re: printing output of ping command > > On Wed, 23 Feb 2005, TapasranjanMohapatr

Re: printing output of ping command

2005-02-23 Thread Chris Devers
On Wed, 23 Feb 2005, TapasranjanMohapatra wrote: > I have a script as follows > > my $host = shift; > my $count = shift; > my $result = `ping -c $count $host`; > if($result =~ m/$count packets transmitted, $count packets received/) > { > $success = 1; > } > print "$re

Re: printing output of ping command

2005-02-23 Thread Ankur Gupta
TapasranjanMohapatra wrote: Hi All, I have a script as follows my $host = shift; my $count = shift; my $result = `ping -c $count $host`; if($result =~ m/$count packets transmitted, $count packets received/) { $success = 1; } print "$result\n"; --

Re: printing output of ping command

2005-02-23 Thread radhika
This works: #!/usr/bin/perl use strict; use diagnostics; my $host = "www.netbsd.org"; my $count = 0; system("ping -c 5 $host"); = thx, Radhika > Hi All, > I have a script as follows > > my $host = shift; > my $count = shift; > my $result = `ping -c $coun

printing output of ping command

2005-02-23 Thread TapasranjanMohapatra
Hi All, I have a script as follows my $host = shift; my $count = shift; my $result = `ping -c $count $host`; if($result =~ m/$count packets transmitted, $count packets received/) { $success = 1; } print "$result\n"; Now, when I run the scr