Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Substring comparison

by trammell (Priest)
on May 01, 2012 at 15:16 UTC ( #968280=note: print w/ replies, xml ) Need Help??


in reply to Re: Substring comparison
in thread Substring comparison

Index returns 0 if the match is at the front of the string, i.e. string offset 0.

perl -le 'print index("foobar","foo")'


Comment on Re^2: Substring comparison
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://968280]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2015-07-02 22:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (46 votes), past polls