Page 1 of 1

Posted: 08/22/03, 4:20 am
by bob
Anyone got a perl program that'll execute another perl program and save the output to a file--or something similar?

Posted: 08/22/03, 11:40 am
by AndrewB
In the "/cgi-bin/" context, or something that runs on the system level? Also, what OS?

Posted: 08/22/03, 11:57 am
by bob
cgi, unix

Posted: 08/22/03, 12:33 pm
by AndrewB
unix is good... Linux I'm assuming?

I dont really code perl, only know how to use scripts :wink: I might be able to give an idea at least though. Is it possible to run shell commands from your /cgi-bin/ on your host? If it is, you could do something that does this:

./pearlscript1 exec ./pearlscript2 >stdout*

*where stdout is a text file, another console, or another program.

I'm sorry I can't give you the exact code required, but its been about 6-9 mos since i've been able to really do some serious BaSH scripting of any kind. I do know the answer is easy to find, and a good place to start is to go to the (<a href="">LDP</a> and search for a BaSH scripting guide. There are some good .html and .pdf files there that among many other things will tell you what commands you need to execute in order to call another script.

I do remember that its easy to find, and the command is only one word w/ optional arguments as the DOS equivalent is.