I am trying to make an array of folders and want to basically take all files inside the folder. However, I got an error saying "missing a $ loop variable". I have add a $, and worked around with this codes, but still did not work .. Is it possible to get all files inside an array of folder?
my @fld = ($folder, $folder2);
for each (@fld)
my @FD = readdir(FOLD);
// I want to read all values inside each directories and display it. how to achieve this?
opendir(FOLD, @fld); First error I see is that opendir expects an expression naming one directory. Any variable starting with @ contains an array whereas opendir needs a string representing the name of one directory only.