in reply to chmod for cgi
I would recommend using the full path instead of this.
Based on the "best" code from perlfunc:
$mode = 0644; # ensures that the mode is in octal chmod $mode, './DIRECTORY'; [download]