"Please do not suggest to use Net::Ping ,I am using system ping command for some reasons."
You will getter better responses from the monks if you can actually state your reasons. Using Net::Ping is generally going to be the better option compared to shelling out to system ping. If you want to shell out or reinvent the wheel you need a good reason to do so. Without a reason this comes across as homework.
I think the reason is that I came off a little mean at around 1050149
when I saw no effort coming from him...