in reply to perl script cannot chmod but shell script does
Append . . . or die qq{Can't chmod "$file": $!\n}; and see if you're getting an error back from chmod that you're missing right now.