http://www.perlmonks.org?node_id=175370


in reply to How can I filter a specified File Type.

Is this from an array or the filesystem?

If it's the filesystem, and it's unix, try:

ls ???1107*
if it's the filesystem, and it's Windows, try:
dir ???1107*.*
if it's an array, try:
my @filtered_files = grep { /^...1107/ } @files;