Then you can try Inline::C or SWIG. However, I wonder if you will really be able to handle 10000 connections with a perl-based server without running slowly, since you have to handle them sequentially and either keep all of the state in memory or switch it in and out of disk storage, which would slow things down even more.