Perhaps you'll need to dig into perlintro and perlopentut first.
In reply to Re: print line to file on win32 by moritz in thread print line to file on win32 by sans-clue