use strict; use warnings; use feature 'say'; binmode STDOUT, 'utf8'; use IUP ':all'; my $dlg = IUP::FileDlg-> new( DIALOGTYPE => 'OPEN' ); # try 'DIR' for folder selection my $app = IUP::Dialog-> new( TITLE => 'Test', MARGIN => '10x10', GAP => 10, child => IUP::Vbox-> new([ IUP::Button-> new( TITLE => 'Select', PADDING => '10x10', ACTION => sub { $dlg-> Popup; if ( $dlg-> STATUS != -1 ) { say $dlg-> VALUE; } return IUP_DEFAULT }), ]), ); $app-> Show; IUP-> MainLoop;