my $file = $mainw_new->getOpenFile( ); &do_something($file) if defined $file;