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

Re^2: Substring comparison

by trammell (Priest)
on May 01, 2012 at 15:16 UTC ( [id://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")'

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-03-19 06:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found