First off, you're new to programming. So, you should go ahead and read some basic books on programming. If Perl is going to be a major focus, I would strongly recommend Learning Perl, aka the Llama book by Randal Schwartz.
All your $dbhs are going against the same DB. So, just use one $dbh.
Whenever you see yourself naming a lot of variables almost the same, use a hash or an array.
Whenever you have repeated blocks of code that vary just by the name of a variable, use a subroutine or a loop.
Update: Changed the name of the book from the Apress book to the O'Reilly book. Whoops!
My criteria for good software:
Does it work?
Can someone else come in, make a change, and be reasonably certain no bugs were introduced?