I think Net::Telnet is only for the client-side connection.
A search on CPAN did not reveal much that indicates a telnet
server already exists. So a good place to start would be the
Telnet specification, in RFC854.
See the "See also" section of the Net::Telnet documentation
for more pointers.