This is my attempt to cut through extraneous issues raised \"Why don’t my system calls work in the Perl program I wrap with pp?\" I have created a simple Perl script on a l
Here is something that worked on my system:
C:\tmp> cat build.bat @echo off mkdir output call pp -o runner.exe runner.pl -a sayhello.bat move runner.exe output\runner.exe
C:\tmp> cat sayhello.bat @echo I am saying hello ...
C:\tmp> cat runner.pl
#!/usr/bin/perl
use strict;
use warnings;
use File::Spec::Functions qw( catfile );
my $prog_path = catfile $ENV{PAR_TEMP}, inc => 'sayhello.bat';
my $output = `$prog_path`;
print "The output was: >>> $output <<< ";
__END__
Output:
C:\tmp\output> runner.exe
The output was: >>> I am saying hello ...
<<<
This feels a little dirty, though.