If you remove OUTFILE from the print statements, do you get the desired output?
In reply to Re: ping with perl by hdb in thread ping with perl by varalaxmibbnl