in reply to Re: Re: Re: Re: Re: Re: Ping and Tracert
in thread Ping and Tracert
You have lost the /g off my regex when you modified it so you only match the first time=87.719 Thus the array only gets this one element. The /g makes it match all the time=nn.nnn and return them to the array. Make the regex @times = $ping =~ /time=(\d+\.\d+)/g; like it was and it will work fine. BTW if you use a char class like this /time=([\d\.]+)/g you are more flexible as you don't insist on the decimal point.
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|