Help for this page

Select Code to Download


  1. or download this
    my $hash_ref;
    while ( my $row = $sth->fetchrow_hashref ) {
    ...
        { 'option'      => $row->{ 'option' }, 
          'option_data' => $row->{ 'option_data' } };
    }
    
  2. or download this
    my $rows = $sth->fetchall_arrayref;
    my %hash = map { 
    ...
        'option_data'   => $_->[2]
      };
    } @{$rows};
    
  3. or download this
    '1234' => [
      {
    ...
        'option' => 'baz'
      }
    ]