Hi Aranya,
I usually use a function like the following:
sub get_list
{
my ( $data ) = shift @_ ;
my ( $selected_value ) = shift @_ ;
my ( @list , $item ) ;
foreach $item ( @{$data} ) {
push( @list , { 'value' => $data->{$item} } ) ;
if ( $item eq $selected_value ) {
$list[-1]->{'is_selected'} = 1 ;
}
}
return( \@list ) ;
}
That way, your script doesn't need to understand the value either, all it
needs to know is how to obtain the list of things in the drop down, and how
to obtain which one is selected by default. You pass it to the sub, and the
sub returns an H::T friendly data structure.
Kenny Smith
JournalScape.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]