in reply to Using DBI to gather time
You have this:
# -- hash to store found exception dates my %fnd_excep = ();
This creates an empty hash (i.e. a list of key-value pairs). However, at no point in the subsequent code, is any data actually stored into that hash.
The hash is then looped through to generate the HTML, but as there's nothing in the hash, there's nothing to loop through.
You probably want to be populating the hash inside this loop:
# -- loop thru the exception data from Voyager table foreach my $row ( @$arrayref_exc_dates ) { my ( $exception_date,$exception_openhour,$exception_closehour ) = @ +$row; if ( not defined $exception_openhour ) { $exception_openhour = "clo +sed" } if ( not defined $exception_closehour ) { $exception_closehour = "c +losed" } # Maybe try something like this!! $fnd_excep{$exception_date} = { open => $exception_openhour, close => $exception_closehour, }; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using DBI to gather time
by Hans Castorp (Sexton) on Apr 25, 2012 at 15:10 UTC | |
|
Re^2: Using DBI to gather time
by Hans Castorp (Sexton) on Apr 25, 2012 at 14:48 UTC |