my @a=`ping -s 1024 $servertotest -c 10`; #### $a[$#a-1]=~/.*?(\d+)%.*/; # Get the Packet loss near the % my $pl=$1; my $rtt=(split'/',(split'=',$a[$#a])[1])[1]; # get the average Round trip time