Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hello fellow Monks!
I have 2 strings, namely:
I want to know how many letters do they share in common. The "traditional" way that I'm thinking of is: 1) Split $first, split $second 2) Foreach letter in @split_first array, see if, in the same position in the array @split_second you have the same letter 3)Count the times you get success Is there something quicker than that? I just need the number of positions in the arrays (they always have the same number of letters), that the have the same letter. Thanks! In reply to Quicker way to compare these 2 strings? by Anonymous Monk
|
|