in reply to Re^2: Longest Common SubSequence Not Working Correctly in thread Longest Common SubSequence Not Working Correctly
Thank you Blokhead. I still have lots to learn about Perl. I have another question for you. The sub lcs takes 2 parameters ($a, $b) but inside the loop where the recursive call is made, the program did a call with
return lcs($a, $b) . $az;
what does the . $az do? I tried printing out the $a, $b but did not see any differences. The new string is one character shorter. When I remove $az from the return, the program produce the wrong result. Thanks again for your help.
|