in reply to trying to find <head> in a string
my $string = q(This is <head> in the string); my $look = q(<head>); my $pos = length($look) + index($string,$look); substr($string,$pos,0)= 'new line'; print $string; [download]