in reply to Running Client in Background

Did you tried to detach the perl script from the terminal using:
fork && exit;

at the very start?