in reply to reducing memory usage
Things that determine how much memory you use are how many variables you have (and how many references too), what types of variables you use, and the stack-depth of your subroutines. Also, the perl interpreter takes up space, and the Tk module and the GUI will take up space as well.
Perl is known to use fair amounts of memory. If memory or speed are ever real concerns and fine-tuning your algorithm doesn't give you the boost you need, there's always C.