pp - PAR Packager , Can't locate strict.pm

1.2k views Asked by At

I have a perl script called master.pl and it contains following lines of code

#!/usr/local/bin/perl
use strict;
system("perl /proj/scripts/slave.pl"); 

I made binary executable of master.pl using command :

pp -b -B -o master master.pl

I copy this executable on other server (as pp command can not be available on other server so i made executable on my linux system ). When i run master it gives me error

*Can't locate strict.pm in @INC (@INC contains: /usr/local/lib64/perl5 .... *

here the issue is slave.pl contains use strict; and @INC shows path which are not valid on that server.

Is there anyway to resolve this issue ? I do not want to make executable of slave.pl . How can i make executable of master that when it calls ''' system("perl /proj/scripts/slave.pl"); ''' then it should have valid path in @INC

1

There are 1 answers

0
daxim On

The problem is system "perl …. This executes the wrong Perl. Use $^X instead.