in reply to Perl migration script

The question is way too vague to be answered in general.

Perl tends to fit very well for such tasks, but there is no generic "data migration script" that magically does everything you want (unless somebody writes a libjustdoit wrapper for perl).

Update: in the CB I learned that the OP is looking for a Batch to Perl converter. I don't know of any automated tool that does it, but perhaps somebody else can help...