in reply to print line to file on win32
Perhaps you'll need to dig into perlintro and perlopentut first.