in reply to Check multiple lines exist in a record

I would read ALL the file in a single string and then apply the regular expression you used on the whole content in the string (can't say if it does what is intended) and check how many times it succeeds. Basically something like this:
#!/usr/bin/perl use strict; use warnings; my $HSSIN='D:\testproject\HSS-export-test-run-small.txt'; my $ofile = 'D:\testproject\HSS-output.txt'; open (INFILE, $HSSIN) or die "Can't open input file"; open (OUTFILE,"> $ofile" ) or die "Cant open file"; my $content = undef; {undef $/; $content = <INFILE> } close(INFILE); my $num_found = 0; while( $content =~ /\t*CF=(CFU-TS10-ACT-(NONE|\d+))/g ){ $num_found++ +} print "multiple cases: $num_found cases of ... " if $num_found > 0; ...
bliako