×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to call another CGI in PERL
2

How to call another CGI in PERL

How to call another CGI in PERL

(OP)
My CGI needs to call another CGI program without user intervention so my question is how can I do this ?

Is there a function or module that can do the job ?

RE: How to call another CGI in PERL

Your question is quite vague.  I can't give you a specific response.  Maybe someone else sees more in the question than I do.
A piece of CGI is just like any other piece of PERL.  If you want to call another program, just do it.  See "backticks", "system", and "exec"ute funtions via
perldoc or on the web or in a book.
Or, ask here again with a little more detail.....like what is the second piece of code doing?   Is it printing to the same client browser?  Is it doing house keeping on the server?  or What?  Note that there are significant differences in how you use backticks and the system and exec functions.  Be aware that making system calls of any sort in CGI stuff can create serious security issues (read problems).

RE: How to call another CGI in PERL

(OP)
Ok here it is:

I have a CGI program that displays a html page while it's doing some functions. The page says ONE MOMENT PLEASE !.
I would like to display another page when the functions are finished, that says OPERATION SUCCESFULL ! or a page that says THE FOLLOWING FUNCTIONS DID NOT WORK !.

By using EXEC(), to call the other page when the functions are finished, nothing happens.

I hope that it is clearer this time.

RE: How to call another CGI in PERL

If the first script does everything you want it to (displays the message and then handles whatever functionality you want), you could just print a redirect statement after the final function exectues, to send the browser to a new page or CGI... since the page is already loaded, you could print javascript relocation code:

<script langus="JavaScript">
  location.href="somenewscript.cgi"
</script>

...and that should forward the browser to the new cgi. if all you want is static text on that page, you may as well forward to an HTML document.

Hope this helps!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close