hello everyone. I think I'm new here and I hope i can fine any answer for all my question. first of all, I'm new in the perl language, so forgive me if I ask some silly question.

my first question is, can you guys tell me how to send a test connection to a server, let say the ip is and get the result whether it succeed or not. Cause I want to use the result to decide the next step.

the script that i want to create is to check the connection to server A. if it exist, then it will run an application in that server, but if it fails, it will run an application in the local machine.

umhh... thank anyway for those who reply and help my inquiry...