in reply to Improve my tcp-mqtt server

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

In addition to what perlfan said about this I would just point out that nohup sends both stdout and stderr to nohup.out by default so this clobbering is entirely unnecessary. Simply

$ nohup ./tcp-mqtt_server_multiclient.pl &

will work as you intend and without clobbering.