in reply to Re: how to tell if file is hidden
in thread how to tell if file is hidden

if ($attrs | HIDDEN) {

I think that should rather be  if ($attrs & HIDDEN) {...}.

Update: Also, I suppose if you request GetAttributes to be exported, you'll also need to specify HIDDEN, i.e.

use Win32::File qw/GetAttributes HIDDEN/;

Or just import :DEFAULT, too:

use Win32::File qw/GetAttributes :DEFAULT/;

Alternatively, simply use Win32::File; and then say fully qualified Win32::File::GetAttributes(...), in which case the HIDDEN constant will not be kept from being exported by default.

(IOW, specifying anything in the import list of a module will deactivate the default export list (@EXPORT) — so in that case you have to explicitly specify everything you need, or include the :DEFAULT tag, representing everything in @EXPORT.)