in reply to converting perl code to a standard Dll
Yes, it's possible to embed Perl in an executable, incl a .dll
perlembed