Thanks for the code, what if I had to read the numeric list of numbers from a seperate text file. In short, I open a file on the file system that contains a list of numbers, next, print the output to an out file on the same filesystem? Sorry I left that out and now I'm a little stumped. How would that change the above script? Thank you for your time.