Hi, Kepler
Try switching your variables in the comparison, ie if ( $str2 =~ /$str1/i ){...
The other issue is that you have pipes at each end of $str1, which will probably interfere with the match (essentially allowing $str2 to always match), so you may want to do something about that (such as removing them, or escaping them, though that will also be problematic)
In reply to Re: Stupid question about strings...
by SimonPratt
in thread Stupid question about strings...
by kepler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |