powerhouse has asked for the wisdom of the Perl Monks concerning the following question:
%month_array = ( 1 => "Jan", 2 => "Feb", 3 => "Mar", 4 => "Apr", 5 => "May", 6 => "June", 7 => "July", 8 => "Aug", 9 => "Sep", 10 => "Oct", 11 => "Nov", 12 => "Dec" );
That does not sort them from 1 to 12, (jan to dec).popup_menu(-name=>"month_array", -values=>\%month_array, -labels=>\%month_array, -default=>$mon, -class=>"formfield")
That did not sort them either correctly.popup_menu(-name=>"month_array", -values=>[sort keys %month_array], -labels=>\%month_array, -default=>$mon, -class=>"formfield")
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Sorting an array
by pfaut (Priest) on Feb 15, 2003 at 00:45 UTC | |
Re: (nrd) Sorting an array
by newrisedesigns (Curate) on Feb 15, 2003 at 00:29 UTC | |
by powerhouse (Friar) on Feb 15, 2003 at 00:38 UTC | |
by newrisedesigns (Curate) on Feb 15, 2003 at 01:09 UTC | |
Re: Sorting an array
by jdporter (Paladin) on Feb 15, 2003 at 03:25 UTC |