Run ping, generate some output and then I will suggest a regex for you to capture the max. This runs under Win32. The output is after the __DATA__ - you can see the output of ping which puts the regex into perspective.
$ip = 'www.perlmonks.com';
$ping = `ping $ip`;
@times = $ping =~ m/time=(\d+)ms/g;
@times = sort { $b <=> $a } @times;
print "High to low @times ms\n";
print "Highest $times[0] ms\n";
print "Lowest $times[-1] ms\n";
print "This was the repy parsed\n$ping\n";
__DATA__
High to low 414 413 408 403 ms
Highest 414 ms
Lowest 403 ms
This was the repy parsed
Pinging www.perlmonks.com [206.170.14.76] with 32 bytes of data:
Reply from 206.170.14.76: bytes=32 time=408ms TTL=237
Reply from 206.170.14.76: bytes=32 time=413ms TTL=237
Reply from 206.170.14.76: bytes=32 time=414ms TTL=237
Reply from 206.170.14.76: bytes=32 time=403ms TTL=237
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|