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, }; }
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Replies are listed 'Best First'.
Re^2: Using DBI to gather time
by Hans Castorp (Sexton) on Apr 25, 2012 at 15:10 UTC

    Nevermind--the data is in the html output file. Thank you so much! I am studying this and trying to grasp the pattern of what you did, what was in the original script, and all. Thanks again. -HC

Re^2: Using DBI to gather time
by Hans Castorp (Sexton) on Apr 25, 2012 at 14:48 UTC

    Beautiful! It grabbed the data perfectly for testing, however the html output file is just my html for the table. I had the table working last week, but I must have done something to it. :-}