Hi,
I have a perl script which runs a new instance of the same script by the "system" command. Under Linux, I have generated an executable out of this script by the pp command (pp -o myScript myScript). When I run the executable, it works fine till the point where a new istance of the script is started, where I get the following error: "par.pl: Can't open perl script "-r": No such file or directory". Notice that "-r" is the first parameter that I pass to the new instance of the script. If I try to start the script with no parameters, it works (but clearly my script complains for missing parameters).
Googling a little bit, I have found at http://hi.baidu.com/_xyw/blog/item/ea6d27501983c213377abe7a.html that they seem to have the same problem under Cygwin (quoting the relevant part in the following):
"The generated executable only need cygwin1.dll to work. But if the executable
need input arguments, it will show error message like par.pl: Can't open perl script *agr1*: No such file or directory. we then need to comment out the following two lines in
.cpan\build\PAR-Packer-1.002-74Drb9\blib\script\par.pl:
#die qq(par.pl: Can't open perl script "$progname": No such file or directory\n)
# unless -e $progname;
(near the line "package main;" in the par.pl) and redo the make."
This fix does not work for me (it just avoids the error message).
Any suggestion to fix this issue is greatly appreciated!
Thanks a lot!