`perl /home/com/begp/test_script.pl` $f || die "Error!";
####
`perl /home/com/begp/test_script.pl $f` || die "Error!";
# Note the $f position before the backtick.
##
##
[sk] % cat prifile
#!/usr/bin/perl -w
print @ARGV; # print whatever is sent.
[sk] % cat callprifile
#!/usr/bin/perl -w
my @files = glob ('*');
push (@files, "0"); # adding a zero as the last element in this array to demonstrate return issue
foreach $f (@files) {
`prifile $f` || die "something went wrong with $f\n";
}
[sk] % callprifile
something went wrong with 0