in reply to Re: Error of the argument
in thread Error of the argument

I wouldn't mix dos path separators with unix ones

...not only that, the specification "c:\files\err" is wrong by itself, because backslashes are special within double quotes (e.g. \f represents a form feed, and \e the escape char).

Including the filename in the error message often is a good idea. For instance,

my $filename = "$files_location/$ID"; open(DLFILE, "<", $filename) || Error('open', "file '$filename'");

In that case, the OP would have gotten something like

The server can't open the file 'c:ilesrr/...': Invalid argument 

which might have hinted at the fact that there's something wrong with the filename...