in reply to Creating new file
print OUT "@results\n"; close(OUT); [download]
You don't need to use a join() to put spaces between the elements in @results. Array interpolation will do that for you.