Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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

( #44560=categorized answer: print w/ replies, xml ) Need Help??

Q&A > strings > How can I find the first position of a substring case-insensitively? 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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2014-08-30 15:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (293 votes), past polls