Executing a perlscript from a perlscript

They have: 45 posts

Joined: Aug 2000

How can it be done?

They have: 568 posts

Joined: Nov 1999

Uou can use fork, or just put it in a sub routine.

They have: 45 posts

Joined: Aug 2000

Fork?

They have: 193 posts

Joined: Feb 2000

require "server/path/to/script.cgi";

Richard
richjb::425

They have: 88 posts

Joined: Mar 1999

Sometimes I call a script using the following
code - not sure it's what your looking for:

this basically checks whether there was any input
in the input boxes and if not sends it back to the
original page:

if(!param('inputbox1') || !param('inputbox2'))
{
url="http://yourscriptnamehere.pl";
print "Location: $url\nURI: $url\n\n";
exit();
}

works quite well for me - can't remember who showed
me it - but it might work for you.

Regards

Steve

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

myriad,
that just 'forwards' the client's browser to the other page.

Laguna-
richjb has got it.

Anyone know if PERL supports 'include' like PHP?
It's a differnt (and I think better) way to include/require files.

Mark Hensler
If there is no answer on Google, then there is no question.

They have: 193 posts

Joined: Feb 2000

PERL also has the "use" statement, which is usually used for the requiring of modules.

I don't think it has an "include" statement that acts the same way as the PHP one does. However, I don't see why you can't just do:

$any = "variables";
$that = "I need."
require "path/to/script.cgi";
'

Richard
richjb::428

[email protected]

Everyone here has a website. It's just that not all are worth posting (Mine! Smiling).

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.