in reply to Repeat match

Neglecting the trivial nits -- such as the superfluous $_ -- it may be easier to use split twice: first with qq(same_text\s=\s\d) on the records from <LF>, then on the resulting array elements. Using split, vs a regex, on your first line:

my $string = q(jsdlkjalsd same_text = 1, jhhj, jhjk = 256,iuqoi,uereoi +u,sjksdh, same_text = 2, lkkj, lksj = 6287); my @inter = split(/(same_text\s=\s)/i, $string);
will yield an array:
jsdlkjalsd same_text = 1, jhhj, jhjk = 256,iuqoi,uereoiu,sjksdh, same_text = 2, lkkj, lksj = 6287

emc

Insisting on perfect safety is for people who don't have the balls to live in the real world.

—Mary Shafer, NASA Dryden Flight Research Center