Passing Args to script via web and command line 
Author Message
 Passing Args to script via web and command line

I am a newbie to perl and was wondering whether this can even be done.

Can a perl cgi script, which gets it data from a webpage, also be set up
to accept input from a command line??

The cgi script I have been playing with is using the GET method.  I have
been able to hard code the QUERY STRING into the script, but that really
isn't flexible.

Any information or thoughts would be appreciated.
--

-------------------------------------------------------------------------------

 Derek W. Boss
 Engineering Data Systems
 Caterpillar, Inc.



_______________________________________________________________________________



Fri, 26 Oct 2001 03:00:00 GMT  
 Passing Args to script via web and command line

I am a newbie to perl and was wondering whether this can even be done.

Can a perl cgi script, which gets it data from a webpage, also be set up
to accept input from a command line??

The cgi script I have been playing with is using the GET method.  I have
been able to hard code the QUERY STRING into the script, but that really
isn't flexible.

Any information or thoughts would be appreciated.
--

-------------------------------------------------------------------------------

 Derek W. Boss
 Engineering Data Systems
 Caterpillar, Inc.



_______________________________________________________________________________



Fri, 26 Oct 2001 03:00:00 GMT  
 Passing Args to script via web and command line

Quote:

> I am a newbie to perl and was wondering whether this can even be done.

> Can a perl cgi script, which gets it data from a webpage, also be set up
> to accept input from a command line??

> The cgi script I have been playing with is using the GET method.  I have
> been able to hard code the QUERY STRING into the script, but that really
> isn't flexible.

> Any information or thoughts would be appreciated.
> --

While running the script in offline mode from command line you can for
sure give arguments and the press ctrl+d.

++Jukka



Fri, 26 Oct 2001 03:00:00 GMT  
 Passing Args to script via web and command line

Quote:

>> Can a perl cgi script, which gets it data from a webpage, also be set up
>> to accept input from a command line??

> While running the script in offline mode from command line you can for
> sure give arguments and the press ctrl+d.

That does rather assume he is using CGI.pm - which is of course what most
people recommend.

/J\
--

Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>



Fri, 26 Oct 2001 03:00:00 GMT  
 Passing Args to script via web and command line

Quote:

> Can a perl cgi script, which gets it data from a webpage, also be set up
> to accept input from a command line??

If you use the CGI module, this is very easy.  It accepts input from
STDIN automatically when run from the command line.  And CGI.pm is even
part of the standard Perl distribution!

--
 _ / '  _      /       - aka -

    /                                http://www.tiac.net/users/chipmunk/



Sat, 27 Oct 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Newbie needs help- trying to submit command-line function to perl script via web

2. Passing command line args w/o form

3. Passing command-line args to X

4. Passing How Do I Send Parseable values via the Command Line

5. Passing form values back to a script as command line arguments

6. too many filenames to pass on a command line to a perl script

7. passing arguments on the command line to the script

8. passing command-line arguments to script !

9. Passing command line arguments to script

10. Hiding command-line args?

11. command-line args style flags from a file

12. Run perl script on web server from command line

 

 
Powered by phpBB® Forum Software