On Wed, 12 Sep 2001, Brett W. McCoy wrote:

> > Hi,
> >
> > I need to pass a string of values to a perl script via:
> >
> >   $numbers = " 1 2 3 4 5 6 7 8 9";
> >
> >   $s = "<a
> > href=\"http://www/cgi-bin/passing.cgi?Number=$p&data=$numbers\";>$numbers</a>";
> >
> > When I do this all I get is the value "1"!
>
> Build an array reference out of it:
>
> $numbers = [qw(1 2 3 4 5 6 7 8 9)];

Whoops, I completely overlooked that you were using this in as get
arguments in a URL.  Obviously the array ref won't work. :-)

You need to encode the spaces in the string with '%20' and then decode
those spaces again once you grab the get parameter.  You can do this
manually, or use some of the methods in URI and URI::URL to encode and
decode those (I thinnk that's where they are).

-- Brett

                                          http://www.chapelperilous.net/
------------------------------------------------------------------------
It's faster horses,
Younger women,
Older whiskey and
More money.
                -- Tom T. Hall, "The Secret of Life"



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to