![]() |
Need Perl script to execute from another. Hi, I am new with PERL programming. I have a question. Is it possible to call a Perl script from an another script. The problem is how to get a response from the script? Any help will be appreciated. |
Re: Need Perl script to execute from another. This will call a new perl process, and may be more expensive on the Code: system. On the other hand I can do Code: But How do I get the response of the script. using either 'use' or 'require'. If you care about speed, consider using do 'filename.pl', which will avoid firing up a new Perl interpreter. |
Re: Need Perl script to execute from another. I think you can do the following; 1. backticks: $retVal = `perl somePerlScript.pl `; 2. system() call 3. eval The eval can be accomplished by slurping the other file into a string (or a list of strings), then 'eval'ing the strings Code: #!/usr/bin/perl Code: do 'somePerlScript.pl' |
All times are GMT +5.5. The time now is 05:52 PM. |