Hello there, you're doing some serious stuff out there, you're employing Perl to solve issues and all that, I'm yet to learn all these modules required but hey, here is a tip, you've to stick to, it saves you a lot of unnecessary headaches, my tip is on the box below:
use strict;
use warnings;
I was not into this habit before but today, I appreciate it so much and I share it with you comrade, no one here at PM would advice you against using either these two lines, esp the first one because we all know its worth.
Take care...
Excellence is an Endeavor of Persistence.
Chance Favors a Prepared Mind.