Im not new to PERL, but Im very new to using TCP or any kind of networking using PERL. I usually use PERL for parsing logs and such(aka make my life easier). I really want to create my own MUD from scratch, for both personal enjoyment and learning - Im finding the hardest part is understanding where to start. I started using IO:SOCKET and created the below script that allows multiple users to connect and roam around a 4 room map. This is just a tester to figure out how to get 2 or more users connected with separate sessions - that piece works!

So my next task to solve is, how to combine the multiusers into teh same environment - Ex. if user 1 walks into teh room where users 2 is, I want user 2's screen to display 'SoandSo entered the room'. Problem is with my script, it only processes and prints to the client when the client has entered input. Has anyone out there created a MUD before that might be able to push me in a direction. I think once I figure out how to create the enviroment where users can interact with each other and world events, the rest will just be the game itself which will be the fun part. Thanks for helping!

The sample script Im playing with - its not really the way its going to look - just trying to figure out the TCP connections stuff:

The thing I noticed while playing around with this is once I use the handler <$client>, everything then waits..the below test script proves this. I would expect to see a dot every second unless I type something...but what it actually does is when $line = <$client> is called...it waits for input. So, Im starting to think I need a different angle on this OR there may be some special way for $line to just grab the contents of handler <$client> without just waiting, and every loop look for $line to have value. Can anyone offer some education here? I very much appreciate it!