Perl Script

Hey! It aint that hard!
Post Reply
bob
BIG GIANT HEAD I Get Free Beer
BIG GIANT HEAD I Get Free Beer
Posts: 7565
Joined: 12/03/01, 12:00 am
Location: St. Louis
Contact:

Post by bob » 08/22/03, 4:20 am

Anyone got a perl program that'll execute another perl program and save the output to a file--or something similar?
WYSIWTF

AndrewB
BIG GIANT HEAD I Get Free Beer
BIG GIANT HEAD I Get Free Beer
Posts: 2385
Joined: 12/09/01, 12:00 am
Location: USA
Contact:

Post by AndrewB » 08/22/03, 11:40 am

In the "/cgi-bin/" context, or something that runs on the system level? Also, what OS?
Keep Your Assets & ID Private! Can you afford not to?

bob
BIG GIANT HEAD I Get Free Beer
BIG GIANT HEAD I Get Free Beer
Posts: 7565
Joined: 12/03/01, 12:00 am
Location: St. Louis
Contact:

Post by bob » 08/22/03, 11:57 am

cgi, unix
WYSIWTF

AndrewB
BIG GIANT HEAD I Get Free Beer
BIG GIANT HEAD I Get Free Beer
Posts: 2385
Joined: 12/09/01, 12:00 am
Location: USA
Contact:

Post by AndrewB » 08/22/03, 12:33 pm

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="http://www.linuxdoc.org">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.
Keep Your Assets & ID Private! Can you afford not to?

Post Reply