Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
However, when I print the output :my $output = `ping $host`;
it doesn't look like when you run it on a DOS command ,, The result of the script will look somthing like this :print "ping result $output\n";
I need it to look somthing like :Reply from 10.58.188.11: bytes=32 time=61ms TTL=123 Reply from 10.58.1 +88.11: bytes=32 time=146ms TTL=123 Reply from 10.58.188.11: bytes=32 +time=60ms TTL=123 Reply from 10.58.188.11: bytes=32 time=60ms TTL=123 Ping statistics for 10.58.188.11: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate r +ound trip times in milli-seconds: Minimum = 60ms, Maximum = 146ms, Average = 81ms
Just like the way it appears when ran on the command line , any thoughts ? thanks in advanceReply from 10.58.188.11: bytes=32 time=61ms TTL=123 Reply from 10.58.188.11: bytes=32 time=146ms TTL=123 Reply from 10.58.188.11: bytes=32 time=60ms TTL=123 Reply from 10.58.188.11: bytes=32 time=60ms TTL=123 Ping statistics for 10.58.188.11: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate r +ound trip times in milli-seconds: Minimum = 60ms, Maximum = 146ms, Average = 81ms
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: formatting the output
by ikegami (Patriarch) on Nov 17, 2005 at 21:31 UTC | |
by Anonymous Monk on Nov 17, 2005 at 21:35 UTC | |
|
Re: formatting the output
by marto (Cardinal) on Nov 17, 2005 at 21:30 UTC | |
|
Re: formatting the output
by jfroebe (Parson) on Nov 17, 2005 at 21:58 UTC | |
|
Re: formatting the output
by GrandFather (Saint) on Nov 17, 2005 at 21:36 UTC |