If you are trying to clear a tty (e.g. xterm) screen then try either of the following within your script: system "clear";or print `clear`;
(where the choice between these two depends on the rest of the script: the first is fast - but proceeds via fork and may not occur at exactly the time that you want it to in the script).
David and Rachel Weintraub <davidw@cnj.digex.net> recommend using the old termcap.pl p4 library. You might also consider the perl 5 equivalents: Term.pm (especially the Term::Control module), Curses.pm, Perlmenu.pm, PV.
Returning to X-windows and perl/Tk: if you are trying to eliminate a TopLevel or a MainWindow then try: $main -> destroy;
If you would rather not destroy then try: $main->withdraw; # remove $main->deiconify; # put back
If $w is a sub-window (sub-widget) then $w->pack('forget'); # remove if packed (newer Tk-b9.01 ) $w->packForget; # remove if packed (older versions) $w->pack(...); # put back
There are also ways to call low level C-ish versions: $w->UnmapWindow;
but that is for special purposes only....
If you are trying to erase an $item on a Canvas then try: delete($item);