Perl | index() Function
This function returns the position of the first occurrence of given substring (or pattern) in a string (or text). We can specify start position. By default, it searches from the beginning(i.e. from index zero). Syntax: # Searches pat in text from given index index(text, pat, index) # Searches pat in