my $first_index = index($content, "+_"); my $second_index = index($content, "+_", $first_index); $content = substr($first_index, $first_index - $second_index);