in reply to Compare 2 string values

Try index. This assumes $[ is 0 as it ought to be.

$str1 = $str2 if index( lc($str2), lc($str1)) != -1;
You don't exactly say you want case insensitivity, but example 2 comment seems to imply you do, so I threw it in. Remove the lc() functions if you don't want it

After Compline,
Zaxo