in reply to Re^2: Bad File descriptor Error
in thread Bad File descriptor Error

I am not sure about the leading backslash problem but I have something to suggest.

You have a file "api_log_file.txt" containing the names of files to be downloaded. You should use ls() to get the list of files and iterate over this list to download selected files instead of a list (@arr) from a different source.

--
Regards
- Samar