# code2 - compare strings $par1 = Encode::decode_utf8($par1) if !Encode::is_utf8($par1); $par2 = Encode::decode_utf8($par2) if !Encode::is_utf8($par2); $res = ($par1 eq $par2) ? 1 : 0; # $res now contain 0 - $par1 and $par2 are not equal