perl - Check whether a string contains a substring -
How can I determine if a string contains a particular place or not?
More specifically, I have to see if This will return the status of the first occurrence of s1.domain.com exists in the string variable present.
if (index ($ str, $ substr)! = -1) {Print "$ str $ includes substr \ n"; }
$ str in
$ substr , or -1 if the substrings are not found.
Comments
Post a Comment