use strict; sub filegrep { ... } my @files = filegrep('Match this!');