in reply to print to match multiple pattern

"Suppose u " read the instrxns around the text entry box: use <code>...</code> tags around code and data.

Since you didn't use code tags around the data, those who try to check your code are at a disadvantage... which is a bad approach when asking for free help.

Then you assure us that the error messages are the "desired output."

So, obviously, problem solved. Moving on...

But maybe that's another mistake... so you get advice from Corion and RichardK to check the content of @t and, specifically, $t[7] which, thus far, you don't appear to have done since you tell us the "data in the 8th column that shows "HIGH", "LOW", "LRR" " but which we can't verify/troubleshooot based on anything you've shown... but which is NOT the case in your sample data, where those strings occur in the seventh column, and should be found in $t[6] if the only problem with your sample data is your formatting and html's rendering of the separators as single spaces.

#!/usr/bin/perl -w use 5.014; #992723 my @temp =<DATA>; my $f=join("",@temp); my @lastreco=split("\n",$f); foreach (@lastreco) { my @t= split("\t",$_); say "testing: $t[6]"; if ($t[6] =~ /HIGH/ && /LOW/ && /LRR/) { print "matched: $1\n"; } } =head unmodified sample data has spaces, not tabs 860414 31 290 28 299 00931.17 HIGH CL1122 860412 501 541 501 554 00977.18 LRR_4 CL0022 860415 501 541 511 564 00977.33 LOW CL0023 =cut __DATA__ 860414 31 290 28 299 00931.17 HIGH CL1122 654321 404 403 402 401 011.1111 ARR34 CL0024 860412 501 541 501 554 00977.18 LRR_4 CL0022 860415 501 541 511 564 00977.33 LOW CL0023 123456 404 403 402 401 011.1111 MED CL0024

Output:

testing: HIGH testing: ARR34 testing: LRR_4 testing: LOW testing: MED

And no, this doesn't address why, even with the corrections above, you're not getting a match... but that answer will be found on numerous (that is, "many," but not "all") nodes here using the term "alternation" or in the documentation for logical operators.