Running a remote Server through perl script

Hello people,

   I am want to run a server on remote machine through perl scripting using telnet api. Now when I try to do so, the server gets started perfectly, but as soon as I close the telnet connection in the script, the server started on the remote machine suddenly goes down. I also tried starting it as background process but in vain.  Is there any way I can start the server on remote machine through telnet or any similar thing, but not letting it go down unless and until I explicitly do so. Also, the script should be able to continue doing other things and not waiting on the process\(Server\) going down on the remote machine.

Thanks a lot,

Cheers