Curses-based Text Editor in Perl