in reply to chmod in perl
Have you checked the return status of the chmod command? For instance,
my $filename = q{deletefiles.txt}; chmod 0777, $filename or die $!; open my $OUTPUT, q{+>}, $filename or die $!;
Hope that helps.
Update: 2011-03-11
Fixed missing semicolon on line 2 of code example causing error referred to in Re^2: chmod in perl.
In Section
Seekers of Perl Wisdom