sub changemod { chmod 0777, $File::Find::name; } eval{ mirror($arg{template_path} , $arg{outpath}); ## this doesn't seem to work find(\&changemod, $arg{outpath}); }; if($@){ print STDOUT "Couldn't create $arg{outpath}: $@"; return 0; }