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 ;)
> > 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 "is alive" in a string variable. How would I go about it. > > I've tried $string = " "; > and then > $string .= $string + system ("ping -a $hostname | cut -c20-30"); > > I'm lost! ********************************************************** This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. **************************************************************** -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>