Posting in full caps is similar to shouting in spoken dialogs. Please, avoid that.
system does not return the output of the command, it returns its exit status. Use backquotes or qx{} to capture the output, or read perlipc for more advanced solutions.
| [reply] [d/l] |
In addition to the concrete points mentioned by the others, you may want to investigate Net::Ping. Somewhat more advanced is AnyEvent::Ping, which can ping multiple adresses in parallel, but its usage is not as straightforward for somebody not yet familiar with AnyEvent. Also, AnyEvent::FastPing, which even uses its own OS thread to send and receive the packets in the background, and which also has rate limiting.
| [reply] |
If you remove OUTFILE from the print statements, do you get the desired output?
| [reply] [d/l] [select] |
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.
| [reply] |