in reply to Database problem
Sorry, I don't have the inclination to delve deeply into the code you post. But in the first handful of lines I notice:
- you don't use strict;
- you don't use warnings;
- you don't check the return status of your open(), e.g.
open(CONFIG, "<homenet.actiontrigger.conf") or die "Can't open config file: $!";