use File::Copy; use IO::File; sub _create_sfx { my $self = shift; my $zip = shift; my $exe = shift; my $fh = IO::File->new($exe, "w"); binmode($fh); # stupid Windows copy(File::Spec->catfile(LocationOfUnzipsfxExe(), 'unzipsfx.exe'), $fh); copy($zip, $fh); unlink($zip); $fh->close(); system(qw(zip -A), $exe); }