in reply to Re: Re: comparing strings
in thread comparing strings
Of course, if you're using arrays, you just need
  p
The following will replace the non-matching chars in the string  $str1 with "*" (and leave the matching chars) by converting $str2 to a regex:if ($lines{$_] eq $lines2[$_]) {
$str2 =~ s/./(?:($&)|.)/g; print map{$_||'*'} $str1 =~ /$str2/
  p
In Section
Seekers of Perl Wisdom