Help for this page

Select Code to Download


  1. or download this
    my $n = length $$strref;
    # shift/rotate string and compare to original
    ...
    # number of differing characters between shifted string and original
    my $ndiff = $diff =~ tr/\0//c; 
    return 1 if $ndiff/$n < $tolerance