# shut the app down after 10 millseconds Wx::Timer->new( $frame, 1000 )->Start( '10', 1 ); Wx::Event::EVT_TIMER( $frame, 1000 , sub { $app->ExitMainLoop } );