There is nothing in general that prevents DBI and tie from working together. As someone else noted, are you sure you want %h->{a} not $h->{a}? Also, do you get the error if you remove the connect from the sub and allow yourself to have a global dbh? -Tats