There's one big flaw: you don't declare packages using braces. Instead, it goes like:
package Foo;
sub method {
...
}
Notice the difference.
Next, you've used warnings -- this is great, since many people tend to forget that -- but you should also try strict. Many other problems are quickly found that way.
Also, you don't print to file handles like you did. Rather, it goes more like:
print $FH Data::Dumper->dump(...);
Try that, see if it helps.
~Thomas~
"Excuse me for butting in, but I'm interrupt-driven..."