This is my first answer after joining perlmonks.
Answer is already posted, but here is perl one liner for doing same thing.
'num' is a file containing numbers.
$ cat num
Hello 12345
world 23456
777381 89651
perl one liner which you can execute in command line for your answer.
$ perl -lpne 's/\d/qw(zero one two three four five six seven eight nin
+e)[$&]/ge' num
A minor correction. Same can be achieved through.
$ perl -lpe 's/\d/qw(zero one two three four five six seven eight nine
+)[$&]/ge'
Once you finish regexes, you can have a look into perl command line options to know what magic is going on in above command.