Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Answer: How can I find the first position of a substring case-insensitively?

by eg (Friar)
on Dec 02, 2000 at 11:55 UTC ( #44560=categorized answer: print w/replies, xml ) Need Help??

Q&A > strings > How can I find the first position of a substring case-insensitively? - Answer contributed by eg

The easiest thing to do would be to use lc on $mystr like so:

  my $index = index( lc( $mystr ), "a" );
Edited by Russ: Combined posts by ambiguous, tektsu, kilinrax, ariels, and tenatious into one

  • Comment on Answer: How can I find the first position of a substring case-insensitively?
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2016-12-04 07:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (63 votes). Check out past polls.