Overuse of regexes is one of my favorite pet peeves also.
As you point out, eq will sometimes do everything you need. Other times all you need is index. For example, if your regex didn't have anchors: if ( $value =~ /true/i ) You could write instead if ( index( lc $value, "true" ) >= 0 )
In reply to Re: You don't always have to use regexes
by VSarkiss
in thread You don't always have to use regexes
by petdance
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |