http://www.perlmonks.org?node_id=101033


in reply to Problem with ActiveState's Win32::File module

Why don't you just reset the READONLY bit (I don't do Win32 stuff much, but just glanced at the docs)? I have no idea what NORMAL is, but I don't think there's a DOS attrib for that...

Win32::File::GetAttributes($path, $attr); Win32::File::SetAttributes($path, $attr & ~ READONLY);

Replies are listed 'Best First'.
Re: Re: Problem with ActiveState's Win32::File module
by John M. Dlugosz (Monsignor) on Jul 31, 2001 at 06:35 UTC
    NORMAL is no bits set. So you obviously can't use that to change anything! But it's used in directory list filtering and in creating files with the desired attributes.

    —John

    (P.S. the value of the constant is actually 128. But ORing that in doesn't make the other bits (READONLY=1) go away. Perhaps setting it, not ORing it in, works.)