Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ASP

$Request->Form() arrays

 

 

ModPerl asp RSS feed   Index | Next | Previous | View Threaded


exlibrismn at yahoo

Jan 3, 2005, 9:22 AM

Post #1 of 2 (1389 views)
Permalink
$Request->Form() arrays

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

Andrew




---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe [at] perl
For additional commands, e-mail: asp-help [at] perl


josh at chamas

Jan 3, 2005, 11:11 PM

Post #2 of 2 (1264 views)
Permalink
Re: $Request->Form() arrays [In reply to]

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 [at] perl
For additional commands, e-mail: asp-help [at] perl

ModPerl asp RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.