Take a look at perldoc -f do to start. You may however, want to consider refactoring a little -- also look at perldoc -f require and perldoc perlmod for other methods. | [reply] [d/l] [select] |
You are going through the wrong way if you are thinking about calling one script from another. You probably need to read perldoc perlmodlib to learn how you write your own module - the right thing for make components and reuse code you wrote.
Igor S. Lopes - izut
surrender to perl. your code, your rules.
| [reply] [d/l] |
Check out IPC::Open2 or IPC::Open3. Both of these are standard parts of the perl distribution. You can send info to the test2's stdin, and receive info back from test2's stdout.
| [reply] |
Hi:
Have you try the command "system"? It's very simple and it works to call an external program and to execute. You can read more about it in the documentation.
I hope that could help you.
Yours sincerely
José Ramón | [reply] |
why on earth would you want to do that? A script is a program... just include the logic of test2.pl within test1.pl and you are done. Of course, if you need to have the logic be reusable, then put that logic in a package, and use Yourpackage within test1.pl. Either way, you need only one script.
Perhaps, if you gave us the contents (or, at least the logic of) what you are trying to do, we could provide more suggestions.
--
when small people start casting long shadows, it is time to go to bed
| [reply] [d/l] |