No one said a "sudden flip." The change came over a twenty year era.
The question about Perry is irrelevant re: 1964. The right wing tactic in arguing the Southern Strategy is that someone somewhere in the multiverse argued that the southern Dems became southern GOP over night. That is false. There is no substantiation for that argument.
However, we read, in order to answer your questions, "In 1984, Perry was elected to the
Texas House of Representatives as a
Democrat from district 64, which included his home county of
Haskell. He served on the House Appropriations and Calendars committees during his three two-year terms in office. He befriended fellow freshman state representative
Lena Guerrero, a staunch liberal Democrat who endorsed Perry's reelection bid in 2006. . . . . In 1987, Perry voted for a $5.7 billion tax increase proposed by Republican governor
Bill Clements.
[19] Perry supported Al Gore in the 1988 Democratic presidential primaries and worked for Gore's campaign in Texas.[20] On September 29, 1989,
Perry announced that he was switching parties, becoming a Republican.[21]
Rick Perry - Wikipedia