Split infinitives are a specific type of misplaced modifier and should be avoided in formal writing.
An infinitive is a verb preceded by the word to: (to write, to examine, to take, to cooperate). When an adverb appears between to and the verb itself, we get a split infinitive.
Really, completely, entirely, and unduly are often used as split infinitives in spoken English. In formal writing, it is considered bad style.
Sometimes avoiding the use of a split infinitive creates ambiguity.
The above sentence creates ambiguity. Is occasionally modifying told or visit? To resolve this, move occasionally right after the verb it modifies.