http://www.perlmonks.org?node_id=1197846

In 2002 I wanted to collect a bunch of code together to administer a gaming system. The main loop of the program accepted user input and invoked a routine to process the request. Eventually I decided that the idea of having a generic shell to which user-defined commands could be added would be useful and a crude version of a command shell was introduced in 2004. Over the intervening years the script and support routines have grown to over 8000 lines of code. Today I released version 3.0.

Even if you don't find the concept of a command shell useful, there is a large collection of helpful functions in cs_fn.pl. For example, you will never get a "Wide character in print" error if you pass your strings to safeString.

print safeString("\x{263A}\n");

Home Page: http://www.exelana.com/techie/perl/cs.html

Documentation: http://www.exelana.com/techie/perl/CommandShell.pdf

Download: http://www.exelana.com/techie/perl/cs.tgz

Let me know what you think!