Maybe the reason backticks didn't work is because you are on Unix and "." is not in your path. This works.
$ ./2.pl Hello $ cat 1.pl #!/usr/bin/perl print "Hello\n"; $ cat 2.pl #!/usr/bin/perl my $output = `./1.pl`; print $output;
EDIT: Not having "." in your PATH on a Unix box also explains the -1 return code you got from system(). The shell could not find the success.pl executable in your PATH.
In reply to Re: Running perl script from a perl script
by jffry
in thread Running perl script from a perl script
by ikuzmanovs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |