in reply to TCP Client/Server handling multiple Client(s) connections, problem with multiple Nicknames

You can use a hash. I wrote some example code to show how you can use it.

my %Nicks; # global variable # you accept the NICK, then $Nicks{$client} = $nick; # later on, when you get a message $client->print("$Nicks{$client} $msg") # NICK message # when the client disconnects delete $Nicks{$client};
  • Comment on Re: TCP Client/Server handling multiple Client(s) connections, problem with multiple Nicknames
  • Download Code

Replies are listed 'Best First'.
Re^2: TCP Client/Server handling multiple Client(s) connections, problem with multiple Nicknames
by thanos1983 (Parson) on Jun 14, 2014 at 08:00 UTC

    To: Anonymous Monk,

    Thanks a lot I was thinking somehow to combine it with a hash. But I was not really sure how to do it. I will have a go thanks again for your time and effort.

    Seeking for Perl wisdom...on the process...not there...yet!