my $text ='catfood'; # returns -1 if not found say index($text,'food',0);