in reply to Problems with Ping

Since you posted no code, I (and others) may not be able to help you very much.

Try this, add:

use diagnostics;

This will at least give you more verbose error messages that might be easier to understand.