Re: String problem

2004-05-20 Thread John W. Krahn
Werner Otto wrote: > > Hi there, Hello, > I am trying to do the following: > > $string = system ("ping -a $hostname | cut -c20-30"); Use the Net::Ping module instead. http://search.cpan.org/~bbb/Net-Ping-2.31/ > This result returns 0 which is suppose to indicate success. But it never > prov

RE: String problem

2004-05-20 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Werner Otto wrote: > Hi there, > > I am trying to do the following: > > $string = system ("ping -a $hostname | cut -c20-30"); Then use backticks(`ping -a $hostname | cut -c20-30`) vs system if you want to see the output. System returns either success or failure, nothing else. Wags ;) >

String problem

2004-05-20 Thread Werner Otto
Hi there, I am trying to do the following: $string = system ("ping -a $hostname | cut -c20-30"); This result returns 0 which is suppose to indicate success. But it never proves me wrong it always stays un-changed at 0. More to the point. I am trying to store the value returned, which would be "i