On Thu, 7 Feb 2002, Scott Lutz wrote:
> I want to access parameters right out of the query_string with out
> having to declare them into distinct variables first, but always come up
> with hash reference errors.
>
> This is what I tried :
> print qq{<input type="hidden" name="bill_email"
> value="$q->param('owner_email')">\n};
>
> and get this output :
> <input type="hidden" name="bill_email"
> value="CGI=HASH(0x810ca00)->param('owner_email')">
>
> Can anyone lend a learning hand here as to what I am doing wrong???
You can't interpolate function (or method) calls directly inside of a
string. If you really want to do that, try something like:
print qq{<input type="hidden" name="bill_email"
value="${\($q->param('owner_email'))}">\n};
Although, grabbing the values out and storing them really is what you
should be doing. You can also ise the Vars() method and store all of the
params into a hash, or, if called in a scalar context, a tied hash
reference (which means you can modify the params).
-- Brett
http://www.chapelperilous.net/
------------------------------------------------------------------------
San Francisco isn't what it used to be, and it never was.
-- Herb Caen
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]