Repeatedly using $1 on the RHS of a substitution without any capturing parens on the LHS looks extremely suspicious to begin with, to say nothing of trying to parse (SG|X|HT)ML with that chain of substitutions. But that never modifies anything in @responsetextall so it's probably moot.
But you don't provide any sample of what the contents of @responsetext or @responsetextall ever contains so who knows other than the obvious answer that appparently none of them have any array references where you think they do. Perhaps you were at one time pushing a new array ref each time through (e.g. you might have had push @responsetextall, [ @responsetext ] or push @responsetextall, \@responsetext (the latter though depends on how/where it was declared otherwise you might get multiple copies of references to the same data)).
The cake is a lie.
The cake is a lie.
The cake is a lie.