in reply to Populating an array with contents of a directory.

This one only returns files, excluding directories. It doesn't pull in the size of the file, but depending on where you need it, you can get that using the -s file test operator.
#!/usr/bin/perl use strict; use warnings; my $dir = 'c:\\temp'; opendir(DIRHANDLE, $dir) or warn "Could not open directory $dir.\n"; my @dirs = grep (!/^\.\.?$/ && -f "$dir/$_", readdir(DIRHANDLE)); foreach (@dirs) { print "$_\n"; }