Let's just say I have this file and I use $/ to read in paragraphs and put all the lines in each paragraph into @lines.
Now let's say in each paragraph I want to match a specific line and it isn't always in the same place in the paragraph which means it would have a different line number sometimes.
So I can't say:
print ($lines) if($lines =~ "whatever);
I have to be able to print that specific line if it gets matched out of $_ or $lines.
What I'm asking - Is there something like this?
print LINE if($_ =~ "whatever");
So when "whatever" is found by the match that line that "whatever" is on get's printed.
Is there anything for PERL that does that or anyway to tell it that because I can't seem to do it.