#!/usr/bin/perl -w use strict; use IO::All; my @files; for ( io('.')->All ) { push @files, $_ if $_ =~/.*\.xml$/i; }