http://www.perlmonks.org?node_id=986887


in reply to How to clear the buffer: Win32::GUI

What are you trying to reset? if you are trying to reset input fields (ie: text box, list box, etc.) and you use the hide function to close/hide the sub window, then your window is still there with all of the data you input. You should create a function to reset the window to the default state when you execute any of the following events: Deactivate(), Hide() or Terminate() event. See onTerminate below.
$Main = Win32::GUI::Window->new( -name => 'Main', -title => $appname, -pos => [10,10], -menu => $MainMenu, -maxsize => [500, 660], -onTerminate => \&Exit_Click, -onMinimize => \&DoHideMe_Click, -onTimer => sub{TimedOperation_Timer()}, -size => [500,650], );