in reply to Matching words

Going by presumably the same problem (Solved: Parsing JSON) this isn't the way to handle JSON. If you have JSON you use a parser to turn it back into a perl data structure (a nested hashref) and then you extract things from that. Trying to pull lines out piecemeal from it is . . . suboptimal, let's say, at best.

The cake is a lie.
The cake is a lie.
The cake is a lie.