You said that you were interested in "...a partial character by character match between 2 files until a non matching character occurs..." By the desired output, it looks like you want a character-by-character match between two words. Here, I believe, is what you've provided:
first_file second_file output
~~~~~~~~~~ ~~~~~~~~~~~ ~~~~~~
amayaM -> amayamAn -> amaya+mAn
souraM -> vismayamAn -> soura+mA
kamalZ -> souramA ->
-> kamalAn ->
The output from the first pair of words makes sense, but I don't see a pattern between the words and the output after that. Please reformat your data using <code> tags and include enough to show the pattern. Also, please show the code that you have tried.