Consider using something like Term::ReadLine.
In reply to Re: clear STDIN by Fletch in thread clear STDIN by Anonymous Monk