I'd do a function. Maybe tomorrow you will need the same with another small variation.
sub foo { my ($table, $hr) = @_; ## TODO: argument checking $Data->Sql ("SELECT * FROM $table"); while ($Data->FetchRow ()) { my %x= $Data->DataHash(); $hr->{$x{ID}}{$x{DataName}}= $x{DataValue}; } } foo "ConfigData", \%ConfigData; foo "DicomDestinations", \%DestinationData;
--
David Serrano
In reply to Re: reuse worth it for small items?
by Hue-Bond
in thread reuse worth it for small items?
by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |