in reply to Re: PERL and ASP: using the $Request Object ?
in thread PERL and ASP: using the $Request Object ?
Thanks Jouke!
I would have spent all day trying to find that out :)
I now understand the object a lot better and have found out that the list of variables stored in the request object is not a hash table at all ... but a STRING!! (this, i'm sure many of you know ... but i'm even more sure that there are many who don't know and may stumble across this one day)
the final code that i wound up using is
I would have spent all day trying to find that out :)
I now understand the object a lot better and have found out that the list of variables stored in the request object is not a hash table at all ... but a STRING!! (this, i'm sure many of you know ... but i'm even more sure that there are many who don't know and may stumble across this one day)
the final code that i wound up using is
this code is used in a situation where one has submited data from one form/webpage to the next. Having all of this information in a hash will allow you to carry all that data into the next form without worrying about what the specific KEYES of each of the form elements.split ('&',$Request->form->Item); foreach my $pair (@_) { my @temp = split ('=',$pair); $form_elements{$temp[0]} = $temp[1]; } foreach my $key (keys %form_elements) { $Response->write("$key = $form_elements{$key} <br>"); }
There may be other ways to do this (feel free to chip in) ... but i think this is a pretty good way of doing it :)
|
---|
In Section
Seekers of Perl Wisdom