in reply to Re^2: multiple connections
in thread multiple connections

Writing to a single file shouldn't be a problem. Do you mean that the problem is that you want to separate the data from the different connections? If so, you could prepend an ID or something to the beginning of the line to distinguish between connections:

print $log "$connection : $buf";

or you could use the same logic to open different files :

open ($log,'>>',"log_$connection.txt") or die $!;

...where $connection is a variable that increments for every new connection that opens, or is based on the IP address, or whatever is meaningful to you.

Have I understood the problem correctly?

hth

clint