in reply to Converting DOS perl to Unix

in VI, you can :set textmode, :e filename, :set ff=dos, and :wq