in reply to Using expressions in arrays for pattern matching

What exactly isn't working? Is it not printing any matches to the output file? Your matches are probably not succeeding due to the newlines at the ends of the patterns. Make sure you chomp the list of patterns from params.txt. Also, for efficiency I recommend reading in the list of patterns outside of the main loop -- you don't need to re-read params.txt each time. Something like this.. (untested)
open my $params => "params.txt" or die $!; chomp (my @params = <$params>); close $params; for my $filename (glob "*.RPT") { open my $output => ">$filename.dat" or die $!; print $output "$filename\n\nParameter Value\n-----------\n"; open my $input => $filename or die $!; while (<$input>) { for my $param (@params) { print $output "$&\n" if /\s$param\s*\d*/ } } }

blokhead