c:\test\anonymonks.pl Global symbol "$lenBig" requires explicit package name at C:\test\1070240.pl line 9. Execution of C:\test\1070240.pl aborted due to compilation errors. #### my $bigstring="MNRIYSLRYSA..."; my $smallstring="GTMARNDGQGKAA..."; my $lenBig = length $bigstring; my $lenSmall = length $smallstring; for my $o ( 0 .. ( $lenBig - $lenSmall + 1 ) ) { my $masked = substr( $bigstring, $o, $lenSmall ) ^ $smallstring; my $matched = $masked =~ tr[\0][]; if( ( $matched / $lenSmall ) > 0.095 ) { $masked =~ tr[\1-\255][ ]; $masked =~ tr[\0][*]; printf "%.2f%% match at offset %u\n", $matched / $lenSmall * 100, $o; print substr $bigstring, $o, $lenSmall; print $smallstring; print $masked; } } ]; $otherstring = q[ my $bigstring="MNRIYSLRYSA..."; my $smallstring="GTMARNDGQGKAA..."; my $lenBig = length $bigstring; my $lenSmall = length $smallstring; for my $o ( 0 .. $lenBig - 1 ) { my $masked = substr( $bigstring, $o, $lenSmall ) ^ $smallstring; my $matched = $masked =~ tr[\0][]; if( ( $matched / $lenSmall ) > 0.90 ) { $masked =~ tr[\1-\255][ ]; $masked =~ tr[\0][*]; printf "%.2f%% match at offset %u\n", $matched / $lenSmall * 100, $o; print substr $bigstring, $o, $lenSmall; print $smallstring; print $masked; } } ]; print compare( $firststring, $otherstring ); __END__ 99.4% plagerised