in reply to TCP Server Exits Loop and Crashes with error

Thanks for all the feedback. I added or die "$!"; to the $client=$socket->accept(); line.

I'm seeing an error now: No child processes at udplisten802.pl line 44.

What does this mean? Out of random googling, I decided to tweak it a bit. I added this:

my $con_handle = fork(); if ($con_handle) { print "Child Spawned [$con_handle]\n"; }else{ <put in the while(1) block here> }
With this code, the script runs, still throws the error about no child processes, but it keeps running though. I don't understand what the code does, but it keeps running. I'd rather fix it so it works properly. What would cause the accept() call to fail?

@ Jethro, If i get a packet for a port that's not defined by a mapping, I have it report an error "Port: 1 is not defined for this host" and the script keeps running. I only get the error after I do an SSH session.

Thanks all for your help!