in reply to print to match multiple pattern

If the words "HIGH", "LRR" and "LOW" can only appear in the column you're interested in (looks like it, given your data set), then try the following on the string that contains your file's entire contents:

use Modern::Perl; my $data = <<END; 860414 31 290 28 299 00931.17 HIGH CL1122 860412 501 541 501 554 00977.18 MED CL0022 860412 501 541 501 554 00977.18 LRR_4 CL0022 860412 501 541 501 554 00977.18 SSA CL0022 860415 501 541 511 564 00977.33 LOW CL0023 END say $data =~ /(?=.*HIGH)(?=.*LRR)(?=.*LOW)/s ? 1 : 0;

Output:

1

The regex effectively 'ANDs' the terms together.