# BITS OF CODE CHOPPED OFF my $buttbrowse = $bin_win -> Button(-text=>"Browse", -command => sub {filepicker}) -> pack(-pady => 20); open (OUT, ">:encoding(UTF-8)", "c:/test/filepath.txt") or print "Can't open file: $!"; # this fails when the script is packed into an exe with PAR::Packer print OUT "File path: how would I know if I get printed before the sub runs?"; close OUT; MainLoop;