in reply to Passing DBH into sub
I do this exact thing, however, I retrieve the variables in my sub thusly:
test($q,$dbh); sub test { my ($q,$dbh)=@_; #stuff in here } [download]