in reply to Re: CGI.pm popup_menu default problem
in thread CGI.pm popup_menu default problem

I think AgentM is right. I went to test this code:

use strict; use CGI qw(:standard); my $html .= popup_menu( -name=>'col_id', -values=>[1,2], -default=>2, -labels=>{1=>'Ali',2=>'Baba'}, ); print $html;

And here is the output I got:

<SELECT NAME="col_id"> <OPTION VALUE="1">Ali <OPTION SELECTED VALUE="2">Baba </SELECT>
I assume this is what you wanted so the error may not be in the bit of code you provided.

Zenon Zabinski | zdog | zdog7@hotmail.com