Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Perl
Perl Misc
CGI.pm and param
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Paul Lalli, post: 4826590"] That is not a scrolling list. That is a key/value pair, where the key is the string 'slist', and the value is a reference to an anonymous array. You are asking us to take your word for the fact that you are using this key/value pair to correctly populate a scrolling list widget of an HTML form. Please don't do that. Post a SHORT but COMPLETE script that demonstrates your error. I find that vaguely unlikely, as $q->{'slist'} is a single item, a scalar value. So it's rather not possible for Data::Dumper to show you five different values. Please post real code and real output. Maybe you meant you did something like my @values = @{$q->{'slist'}}; print Dumper(@values); Because param() is working the way it was intended. It's not returning the first element. It's returning all values of your scrolling list that were selected by the user filling out your form. That is what param() returns. That is what it is intended to return. If you want to get a list of all possible options for this scrolling list, you've already seen how to do it - access the relevant hash entry in the CGI.pm object. If you can tell us *why* you think you want param() to return something other than what it was intended to return, perhaps we can show you a better way. Paul Lalli [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
CGI.pm and param
Top