in reply to dbCopy.pl

I agree with each of gav^'s recommendations and would add one more:

Your getData() subroutine could also be written this way. It may be just a matter of taste...

sub getData { my ($sql,$dbHash) = @_; return $dbHash->{connect}->selectall_arrayref($sql); }

--Dave