Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Calling subroutine with exec() in .cgi script

by graff (Chancellor)
on Jan 19, 2006 at 03:46 UTC ( [id://524119]=note: print w/replies, xml ) Need Help??


in reply to Calling subroutine with exec() in .cgi script

If the exec("/path/to/file.cgi") is meant to be called from a script that you run in a command-line shell, the easiest way to provide the cgi parameters to the cgi script that is being exec'd is to include them as a command-line arg, and in this case, it would be really important to use the "list" style invocation of exec():
my $cgiprog = '/path/to/filename.cgi'; my $cgiparams = 'action=task1&user=me'; exec( $cgiprog, $cgiparams );
Assuming that the cgi script being exec'd in this fashion is using the CGI module, $ARGV[0] will automatically be treated as the QUERY_STRING.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://524119]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-24 16:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found