...... #gui(); # works # below fails my $gui_thr = threads->create( \&gui ); my $res1 = $gui_thr->join(); ... sub gui { # mw contains frames 1,2 and 3 top to bottom $mw = MainWindow->new( -background=>"$stock_bg"); $mw->resizable( 0, 0 );