You might want to have a look at the 'glob' function. It allows a wildcard expression and puts the results in an array.
eg. (yes, it's cygwin, so YMMV)
#!/bin/perl
use strict;
use warnings;
foreach (glob ( "/cygdrive/c/temp/*" ))
{
print $_, "\n";
}
Not amazingly _efficient_ (or so I'd imagine, I haven't profiled glob) but pretty straightforward code.