Yes this is possible using Perl.
You will need to learn a lot of things first before you could tackle this task in Perl though, since you are new to Perl.
On the database side, you need to learn how to use DBI and DBD::{Database}. There are a few database tutorials here at Perl Monks. You can find the tutorials if you browse under
.