use IO::Dir; my $d = IO::Dir->new('.') or die("ack: $!"); print $_,"\n" for grep -f, $d->read;