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.)
In reply to Re^2: how to tell if file is hidden
by almut
in thread how to tell if file is hidden
by redss
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |