in reply to DBI and Hash
Could you, for example, get away with:
foreach my $temp (@dbfields) { $sqlinsert{$temp} = "DUMMYDATA" unless ($sqlinsert{$temp});
Of course, if your DB fields are data-type constrained, you'll have to do your substitution on a per-key basis -- to ensure that INT fields get a dummy INT value, and so on ( ...and it'll get really tricky if there's a BOOL field. :-) )
OTOH, who controls the format of the log files? If you do, perhaps you'll find it easier to tackle that end of your puzzle, supplying an appropriate dummy value to each empty field.
Update: recast first question.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DBI and Hash
by elmic11111 (Novice) on Feb 13, 2012 at 23:28 UTC | |
by Anonymous Monk on Feb 14, 2012 at 08:57 UTC |