Personally I'd change if ($2 == $null) halt to if ($2 !isnum) halt to prevent the script goofing up if you happen to stumble on a clown who 'fixed' his ping msg.