in reply to how to get rid of cut-and-paste sins?
In a similar vein to moritz' advice, you may wish to take a look at the links mentioned in Finding duplicated code in Perl.
HTH,