General discussion

Locked

Pass arguments to Perl from CGI

By tymitche ·
I have a CGI script "start.pl" that collects a bunch of information via a form (i.e. $query->param('username')). Upon SUBMIT I want to reload the "start.pl", but (in the background), pass the 'username' parameter to another script "runme.pl". Runme.pl will be using the parameter as an argument in a system() call.
I don't want any of the output from runme.pl to appear my web pages at all.
I tried using the "do", "eval", "system" functions but none seem to do what I want. I am able to use "do" to start the other script but cannot figure a way (short of writing to a text file) to pass the parameter on.
Any ideas?

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Pass arguments to Perl from CGI

by tymitche In reply to Pass arguments to Perl fr ...

Perhaps I should mention that I can start RUNME.PL find from the command line, with my parameters strung on after it and using the $ARGV[n] function to grab the parameters. But when I tried something similar from START.PL it doesn't work.
i.e:
system ($commandline,$argument);

Collapse -

Pass arguments to Perl from CGI

by tymitche In reply to Pass arguments to Perl fr ...

Point value changed by question poster.

Collapse -

Pass arguments to Perl from CGI

by Lo In reply to Pass arguments to Perl fr ...

Might try creating enviroment variables before you run runme.pl and reading them (and deleting?) from the runme.pl application.

Collapse -

Pass arguments to Perl from CGI

by tymitche In reply to Pass arguments to Perl fr ...

Lo, I know where you are coming from but that is not really what I need. I was looking more for the proper method for passing a variable from one script to another. I have since learned that I "need" to use Object Oriented procedures to make my life easier.

Collapse -

Pass arguments to Perl from CGI

by tymitche In reply to Pass arguments to Perl fr ...

This question was closed by the author

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums