in reply to Runaway Forking Problem (was: simple perl2)

Try out Term::ReadLine. It will give you nice interface instead of $cmd = <STDIN>;.

You get ctrl-(\w), as well as a command buffer that is searchable. Well, you basically get GNU Readline :)

Oh yeah, don't forget to use strict :)