in reply to Searching a file for two strings

I suppose, your Searchexpressions are [message] and [here], as the forum sets them as links.

If you've got those two lines in one $string, you can do so

if ($string =~ /\[message\]/ and $string =~ /\[here\]/ ){ ...
If you have those lines in a String calles $_, then:
if (/\[message\]/ and /\[here\]/ ){ ...
If you have got the two lines in two different strings $string1 and $string2, try
if ($string1 =~ /\[message\]/ and $string2 =~ /\[here\]/ ){ ...

Best regards,
perl -le "s==*F=e=>y~\*martinF~stronat~=>s~[^\w]~~g=>chop,print"