[thelist] Getting parameters in Perl

Burns, Martin BURNSM at rbos.co.uk
Mon, 9 Aug 1999 09:15:59 -0000


Anthony

As this is one of the most FAQs in SSI, would you like to post
this onto the evolt site?

Cheers
Martin
(Sorry, haven't had time to do anything with your polling script -
been *way* too busy to do anything more than wee things)

> -----Original Message-----
> From:	Anthony Baratta [SMTP:Anthony@Baratta.com]
> Sent:	06 August 1999 16:36
> To:	thelist@lists.evolt.org
> Subject:	Re: [thelist] Getting parameters in Perl
> 
> 
> *** Warning : this message originates from the Internet ****
> 
> Oliver Lineham wrote:
> > 
> > Hi,
> > 
> > I've been writing some Perl.. and I want to include the script in a page
> > using SSI. This is easy. BUT I want to pass parameters to the script.
> Two
> > questions:
> > 
> > 1. Is the correct way to simply put a space between, like with a unix
> > command. that is: <!--#exec cgi="/cgi-bin/thescript.pl theparameters"
> --> ??
> 
> This is not correct. The #exec cgi= does not allow you to pass variables
> to it. You must use #exec cmd=.
>  
> > 2. How do I access these parameters from my script? I'm used to using
> query
> > strings, you see.
> 
> I do this:
> 
> <!--#exec cmd="/full/path/to/script.cgi Key1=Value1 Key2=Value2" -->
> 
> Then parse it using &ReadParse from cgi-lib.pl. It acts just like form
> input.
> 
> -- 
> Anthony Baratta
> President
> KeyBoard Jockeys
>                     South Park Speaks Version 3 is here!!!
>                        http://www.baratta.com/southpark
>                               Powered by Tsunami
> 
> _______________________________________________
> Unsubscribe & Options: http://lists.evolt.org/mailman/listinfo/thelist
> 
> Archive: http://lists.evolt.org/
> http://evolt.org   -  Workers of the Web, Unite!


This e-mail message is confidential and for use by the addressee only.  If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer.

'Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent.'