The perl's output goes to everyone
Run the Perl's scripts as "nobody"
Keep track of sent messages.. or somehow like this.

Kind of a history for the sent messages so that user can just press the up//down
arrow and the prev/next message comes to the input box.