I’m using ActivePerl on a Win 7 box and I want to use the Proc::Reliable CPAN module. It downloaded and installed properly but when I tried to run the following code, it failed at run
my $newProc = Proc::Reliable->new()
$newProc->run("perl.exe -e print 'hello world'");
I tried a couple things, such as testing the status and trying to retrieve output, but with no luck. As best as I can tell, the program dies silently on run.
For reference perl.exe is in my PATH variable and I’m calling this from commandline as: perl.exe test.pl
It probably isn’t failing.
-e print 'hello world'tells perl to execute the codeprintwith @ARGV set tohello world(or perhaps("'hello","world'"), I forgot how windows cmd quoting handles ”). This prints the contents of $_ (that is, undef) to STDOUT.Always use warnings. Even on one-liners. Perhaps especially on one-liners. Compare:
and