in reply to Re^3: Win32::File::SetAttributes not numeric?
in thread Win32::File::SetAttributes not numeric?

I am currently using the pragmas use strict; use warnings; use diagnostics;

You only think you are. Just like use Win32::File; isn't working, neither is use strict;.

$ perl -e'use strict; my $attr; $attr |= READONLY' Bareword "READONLY" not allowed while "strict subs" in use at -e line +1. Execution of -e aborted due to compilation errors.

Without use strict;, READONLY would be considered the same as "READONLY", which is the symptom you described.

Replies are listed 'Best First'.
Re^5: Win32::File::SetAttributes not numeric?
by mcarthey (Novice) on Jun 05, 2009 at 20:02 UTC

    Sorry I should have been more specific. You are right that I encountered that issue, but I am using use strict 'vars'; to avoid this.

    Thanks!
      Turning off strict is akin to turning off error checking. It doesn't make the problem go away. Don't do that.