in reply to creating a state machine

If you still want to build your own protocol after reading merlyn's post...

POE Cookbook have many examples and you can always look on source code of existing POE components. Since your protocol is close to SMTP then source code of POE::Component::Server::SMTP is probably the best example.

--
Ilya Martynov, ilya@iponweb.net
CTO IPonWEB (UK) Ltd
Quality Perl Programming and Unix Support UK managed @ offshore prices - http://www.iponweb.net
Personal website - http://martynov.org