in reply to compare two files

I am guessing your files would be:

File a:

123123123

File b:

123123

Where do you want to take the numbers from? The start, or the end? What generates these files? Are only \d digits present in the file? Should your program freak out if none digit characters are present?