declare $db $user etc.. as
my $db
my $user etc ...