Thanks for your help to all. I really like the simplicity of ikegami's reply, but while it gives the answers, how would I make it so that it returns something when the result is zero, because the maya had a zero place holder. The others are also great, and I will learn from them; I just would rather not have to use a cpan module for such a simple task, and I need the results by number so I can output a symbol gif for each. Again, thanks to you pros.