#!/usr/bin/perl my $ouput = `egrep -f patternfile testfile > output`; print "$output\n";