MongoDB Perl exercise