in reply to Improve my tcp-mqtt server

nohup ./tcp-mqtt_server_multiclient.pl 2> nohup.out &

Probably not your issue, but make sure by not clobering nohup.out:

nohup ./tcp-mqtt_server_multiclient.pl 2> nohup.out.errs &
You can checkout nohup.out for messages via STDOUT, still.

You can skip nohup and catch the signal in the Perl code, then do something actually useful, like reread a config or reset the service, etc:

$SIG{HUP} = sub { warn "never gonna give you up!" };