It's kind of a pain in the butt, but here's one way:
my $haystack = "foobar"; my $needle = "Bar"; $haystack =~ /($needle)/gi; print ((pos $haystack) - (length $needle));
In reply to Re: Answer: How can I find the first position of a substring case-insensitively?
by cogent
in thread How can I find the first position of a substring case-insensitively?
by ChilliHead
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |