in reply to Re: system commands in os x apache
in thread system commands in os x apache

mkdir('/cgi-bin/NEW');

Also, the path /cgi-bin/NEW looks suspicious, as it would either try to create a directory in the filesystem's root directory / (where the webserver user typically has no permission to write), or in /cgi-bin, which probably doesn't exist. And in case there is no /cgi-bin, Perl's mkdir would also need to create two nested directories in one go, which it generally doesn't.

Maybe the OP rather simply wants something like 'NEW' (assuming the current directory of the CGI script is the cgi-bin directory (not unlikely)).  Otherwise, the absolute physical path to the web-account's cgi-bin in the filesystem would likely be more appropriate.