Win32::Perms autoexports various constants for use in conjunction with its methods. The problem is that one of those constants is (unhelpfully) named DIR -- which apparantly has the value 2.
The simplest work-around is to use a different name than DIR for your directory handle.
Alternatively, you could use a lexical filehandle my $DIR on the opendir and $DIR elsewhere.
In reply to Re: Strange problem with Win32::Perms
by BrowserUk
in thread Strange problem with Win32::Perms
by ChrisR
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |