--- Dermot Paikkos <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I am trying to access the parameter list from a form. I keep getting 
> a "Not an ARRAY reference at (eval...)". The error seems to refer to 
> 
> my @names = $q->param;

I suspect you're off by a couple of lines:

  my @names = $q->param;
  my $params = Vars;
 
  my $len = @{$params}; # $params should be a hashref

Vars() returns a hashref, not an array ref.  Also, if you're going
through the trouble of fetching the param() list, why use Vars?  Vars
is to provide compatability with old cgi-lib scripts.  Becuase it
separates values with null bytes, you run the risk of exposing you code
to a security hole known as the "null byte hack".  I explain the latter
in lesson three of my CGI course: 
http://users.easystreet.com/ovid/cgi_course/lessons/lesson_three.html

Cheers,
Ovid

-- 
If this message is a response to a question on a mailing list, please send
follow up questions to the list.

Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/

-- 
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