in reply to Not writing to file

Can one of you tell me what simple thing I am missing

Well, you are never printing to your filehandle. You want to print the results of the ping to FILE. Also, you don't need the \n in the system() command, and you may want to look at Net::Ping.

perldoc -f print
perldoc -f system

Cheers,
KM