in reply to Non-forked, bi-directional client/server

I gave an example of this here: Re: Daemons in Perl basically what you need to do, is instead of:
} else { my $buf = <$sock>; if ($buf) { print "$buf\n";
Call a function with $buf and the socket_object as parameters, the function can then parse whatever it got, and answer by writing to the socket with print $socket.
In the client you also need an IO::Select and a loop using select (or can_read() as I did), and do essentially the same thing.
I've written a few client/server scripts, and never used fork(), if you want to simultaneous two-way conversation, you can also use Threads, which I've also used, (The 5.005 version at the mo, still trying to figure out how to convert to ithreads..)
C.