in reply to print line to file on win32

You have generate a random file name for each line, open the file, print to it, and then close it.

Perhaps you'll need to dig into perlintro and perlopentut first.