Can someone explain why this is not working.
I capture a single column but more then one row.
my $rows = $sth->fetchall_arrayref();
I then return the refs from the subroutine.
$options = get_options()
<
I then pass it to another subroutine
change_dboption ( \$dbh, $DB, $date, $options );
Then I loop through the rows and try to build the hash with a count
my $count = 1;
my %option_ref = ();
foreach $option ($options){
%option_ref = {$count => @$option};
$count++;
}
I feel like I am reinventing the wheel by creating the hash but I want the user to be able to input an integer to represent the options returned from the database. So the value they supply will be used to call up the value from the hash.