in reply to Testing if a string is a substring
That is what index is made for:
You may just want to call index directly, since it returns the location in $string of the first match.sub is_subst { my ($string, $subst) = @_; -1 != index( $string, $subst); }
After Compline,
Zaxo
|
|---|