in reply to How do I read files from a folder and place them into a list?

Or how about using this? Seems a bit easier and shorter
my @files = <*>;
or you can do this if you want a list of files only (not directories)
my @files=(); while (<*>) { push (@files,$_) if (-f "$_"); }