Except, of course for
$s1 = "\0"; $s2 = $s1 x 2; my $diff_pos = ($s1 ^ $s2) =~ /[^\0]/ ? $-[0] : undef; print defined $diff_pos ? "diff_pos says the strings differ at $diff_pos\n" : "diff_pos says the strings are equal.\n"; print $s1 eq $s2 ? "and Perl says they are equal\n" : "and Perl says they are not equal\n";
In reply to Re^2: Should string inequality operators return the point the of divergance?
by Corion
in thread Should string inequality operators return the point the of divergance?
by demerphq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |