Update: My suggestions below do not work. However, I am going to leave them in case anyone has a similar question. This answer shows a lot of things that may sound reasonable, but don't work.
See the discussion after the OP repost for code using $ ENV {PAR_TEMP} , which solves the OP problem
FOR LINK
pp docs say:
-a, --addfile = FILE | DIR ...
By default, files are placed under / inside the package with their original names.
Using the system, you request cmd.exe to find the file, and now I understand that this is probably a losing battle if you do not have a separate executable file called cpau.exe . I don't have time to try this right now, but you may need fork and exec instead of relying on system . How in:
exec 'CPAU.exe', @args
Previous answer:
The line passed to system does not contain what you think:
use strict; use warnings; my $x= "..\cpau -dec -file ..\add_rec.job -nowarn -wait"; print $x, "\n"; __END__ C:\Temp> fgh ..โบau -dec -file ..dd_rec.job -nowarn -wait
Use (edited after OP comment below):
system "..\\cpau -dec -file ../add_rec.job -nowarn -wait";
I would also recommend using the system list form:
system '..\\cpau', qw(-dec -file ../add_rec.job -nowarn -wait);
Alternatively, you can find FindBin if you want to specify the path to cpau relative to the current script.
For example:
#!/usr/bin/perl use strict; use warnings; use FindBin qw($Bin); use File::Spec::Functions qw( catfile ); my $program = catfile $Bin, '..', 'cpau'; system $program, qw(-dec -file ../add_rec.job -nowarn -wait); __END__
Sinan รnรผr
source share