in reply to making a list and saving results

I assume you mean print each number on a new line:
print "$_\n" for @list;
Saving the output is something the shell can do trivially:
% perl myprog.pl > ~/mylist.txt