in reply to noobie write list to file out

See print and I/O Operators
open FILEOUT, '>', $fn or die $!; print FILEOUT @out;
Please read Markup in the Monastery to better format your questions.