Many ways..
Using File::Slurp.
use File::Slurp;
my $file = "$inputFilePath/checkOutput";
my @checkOutput = grep { /blah/ } read_file( $file );
or maybe the file is really large and you don't want to 'slurp'..
my $file = "$inputFilePath/checkOutput";
open( my $out, '<', $file ) || die "Can't open $file: $!";
my @checkOutput;
while( <$out> )
{
push( @checkOutput, $_ ) if /blah/;
}
close( $out );
or make that while a bit more compact..
my @checkOutput = grep { /blah/ } <$out>;
or if you're on a Unix machine and your pattern can be done
using grep from the OS.
open( FH, "/bin/grep 'blah' $inputFilePath/checkOutput |" )
|| die "Can't grep $file: $!";
my @checkOutput = <FH>;
close( FH );