in reply to ping with perl

The system function is not returning the output of the called OS command, but the exit status of the forked child. If you want to retrieve the output, you need to use the backticks, although I am not sure what the result will be with a ping command.