On 4/21/05, Robert <[EMAIL PROTECTED]> wrote:
> This is my hash structure:
>
> "Veterans Day" => {
> date => '20051111',
> type => 'US',
> federal => 'true',
> active => 'true',
> },
>
> Would I just use a placeholder (?) in my statement and pass it in via that?
> It will be in a loop as I have quite a few.
assuming your holidays are a HoH called %Holidays,
you'd use five placeholders and call
execute ($HolidayName, @{$Holidays{$HolidayName}}{qw/date type
federal active/});
if you don't mind saving a wee bit of programmer time and spending
more hardware effort
you might be able to use Tie::DBI to allow something like
$HolidayDatabase{$HolidayName} = $Holidays{$HolidayName};
provided the key names (and the boolean representations) match.
--
David L Nicol
$ perl -wc -e 'use strict; the deer and antelope play ; print 1'
-e syntax OK