Use the system-command for this, e.g. my $result = system("perl insideScript.pl");.
Alternatively, you could use backticks (`` or qx//) (e.g. my @result = `perl insideScript.pl`;).
As you see, the difference is on how to handle the output and result of your inner script.
HTH, Rata
| [reply] [d/l] [select] |
I suspect you are attempting to use perl as if it was a shell. UNIX shells inspect commands and decide if they are keywords, aliases, built-ins, functions or external programs (or other exotics). This is quite unusual for a programming language, but convienient for a command-line driven shell. Perl, like most programming languages, does not work in this way.
See system, which is based upon the function of the same name in C (although it is smarter). You can also use back-ticks `` as you would in a shell, or qx. | [reply] |