People told already but I like to say:
use strict is good for you as well as use warnings :p
Another thing is to look at perldoc DBI and http://dbi.perl.org/ to find more information about how to use DDL (like create table statement) and DML with or without binds
Also don't forget to open and close your file handles properly (perldoc -f open).