in reply to Re: Problem with CGI::Vars
in thread Problem with CGI::Vars

FWIW with Vars() it returns a \0 (null) separated string for multiple values with the same param name (hash key) which was the cgi-lib.pl way or doing it. This is a compatibility method that should not really be used. As you point out all that has to be done is:

use CGI; my $q = new CGI; # iterate over all param names for my $param ( $q->param() ) { print "<p>Param $param\n"; # iterate over all values for param name $param for my $value ( $q->param($param) ) { print "<br> value: $value"; } }

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Replies are listed 'Best First'.
Re: Re: Re: Problem with CGI::Vars
by sawanv (Novice) on Feb 09, 2003 at 04:55 UTC
    Hello.

    Done that foreach param() stuff, it shows the same as $q->Vars(), ie still not doing the right thing.

    Thanks
    Sawan

      As suggested by me at Re: Re: Re: Problem with CGI::Vars show the HTML and Data::Dumper example output.

      For what it is worth it is a computer. It always does the right thing. You're problem is that you think you are telling it one thing but you are not.

      Show the requested output and your HTML or there is nothing we can do to help.

      cheers

      tachyon

      s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print