If you are a slacker like me you might like to use the File::Slurp module. The read_dir function will reads directory contents into an array, removes the dots, and if needed prefix the files returned with the dir for absolute paths
my @paths = read_dir( '/path/to/dir', prefix => 1 ) ;