##
# get current file attributes
Win32::File::GetAttributes($file, my $attr);
# set file attributes to allow editing
$attr |= READONLY;
Win32::File::SetAttributes($file, $attr);
####
my $setReadOnlyAttribute = READONLY;
# set file attributes to allow editing
Win32::File::SetAttributes($file, $setReadOnlyAttribute);