I'm a little confused. Why is a Perl script needed for this? Why not just invoke unix2dos directly instead of via the Perl script?
P.S. It is almost trivial to write the equivalent of unix2dos in Perl without the need to invoke unix2dos using system().
P.P.S. Though I don't understand the need for this I suspect you need
where $file contains the filename.
Retired horse trader.
Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.