XP is just a number | |
PerlMonks |
Re^3: TCP Server using fork to accept multiple requestsby tybalt89 (Monsignor) |
on Aug 20, 2022 at 16:29 UTC ( [id://11146265]=note: print w/replies, xml ) | Need Help?? |
The socket is closed when $new_sock goes out of its scope, which is the "if" statement, so the socket IS closed when the outer "while" repeats. All the parent has to do is exit the "if".
In Section
Seekers of Perl Wisdom
|
|