Loading ...
Sorry, an error occurred while loading the content.

Re: $Request->Form() arrays

Expand Messages
  • Josh Chamas
    ... I believe this will work for you: my @Subjects = $Request- Form( Subjects ) but you may want to do this instead: my @Subjects = @{$Form- {Subjects}};
    Message 1 of 2 , Jan 3, 2005
    • 0 Attachment
      Andrew Koebrick wrote:
      > I am in the process of shifting from CGI.pm to the $Request->Form
      > ($name) method for reading in form data in a few applications.
      > CGI.pm was handy because it automatically created an array for all
      > varialbles where there were multiple values. What is the best way in
      > Apache::ASP to get the data into an array, rather than just an array
      > ref?
      >
      > Currently I am using:
      > my @Subjects = $Form->{Subjects};
      >
      > But all I have access to is:
      > ARRAY(0xa21edd4)
      >
      > Rather than a real array.
      >
      > Thanks for any lesson in dereferencing...
      >

      I believe this will work for you:

      my @Subjects = $Request->Form('Subjects')

      but you may want to do this instead:

      my @Subjects = @{$Form->{Subjects}};

      Regards,

      Josh

      ---------------------------------------------------------------------
      To unsubscribe, e-mail: asp-unsubscribe@...
      For additional commands, e-mail: asp-help@...
    Your message has been successfully submitted and would be delivered to recipients shortly.