in reply to Using Perl with Samba Modules

Please see here

It's not so much an answer to your question as much as it's a guide to get a better answer.