I have the following files.
a.pl
#!/usr/bin/perl
system('perl b.pl');
b.pl
print `cwd`;
require "conf/cf.pl";
cf.pl
$var = "val";
1;
And this is the directory set-up.
testdir/a.pl
testdir/b.pl
testdir/conf/cf.pl
I am in the directory testdir and run the command:
perl a.pl
This fails with
testdir
Can't locate conf/cf.pl in @INC...
Why can't it find that include file even though the current directory is correct?
This is on Kali Linux.