Help for this page

Select Code to Download


  1. or download this
    use List::Util qw( first );
    my @user_types
    ...
    my $selected = first { $_->{name} eq $cgi->param( 'foo' ) } @user_type
    +s;
    $selected ||= $user_types[0]; # in case nothing is selected
    my $selected_numb = $selected->{numb};