if (my $pos=$str1 gt $str2) { $pos+=0; print "A:$str1\nB:$str2\n"; print "The ".(1+$pos)."'th (index $pos) char in A is 'greater' than that in B\n"; }