Perhaps you wanted $s2 =~ s/.+/t/g;
In reply to Re: Incorrect pattern recognition problem. by ikegami in thread Incorrect pattern recognition problem. by b2sing4u