Mike Blezien wrote:
What does this type of error indicate, I never encountered this type of error before.

---------------------------------------------
Modification of a read-only value attempted at
/home/www/cgi/somescript.cgi line 151.
---------------------------------------------

<code snip>
my($sparam);

foreach $sparam (param()) { ${$sparam} = param($sparam); } # line 151
------------------------------^^^^^^^^^^^^

Maybe it's that; hard to tell since you don't give more context. But what you are trying to do, i.e. using symbolic references, is unnecessary and considered bad programming practice.

The standard way to avoid it is to use a hash instead of a bunch of scalars. In the case of CGI parameters, you can simply do e.g.:

    use CGI;
    my %param = new CGI->Vars;

That would give you all the parameters conveniently available in the %param hash.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to