my $setROattr = READONLY; my $unsetROattr = ~READONLY; # set file attributes to allow editing Win32::File::SetAttributes($file, $unsetROattr);