in reply to Re^10: Comparing 2 different-sized strings
in thread Comparing 2 different-sized strings
You are submitting 2 parameters (2 dna sequences) to the subroutine, so in the above code which computes the hamming distance, how do you know which variable refers to which sequence? Or could you just explain what the code above is doing? Thank you so much!sub hd{ length( $_[ 0 ] ) - ( ( $_[ 0 ] ^ $_[ 1 ] ) =~ tr[\0][\0] ) }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^12: Comparing 2 different-sized strings
by BrowserUk (Patriarch) on Aug 13, 2013 at 21:06 UTC | |
|
Re^12: Comparing 2 different-sized strings
by choroba (Cardinal) on Aug 13, 2013 at 20:41 UTC |