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


in reply to perl chmod tells me file does not exist (but it does)

It should be:
chmod( oct($perms), $target_file );

stephen