in reply to Creating a directory.

the first form is what you want. the reason that the directory is being created with g+s is most likely that its parent directory is g+s.

i would just create it and chmod it after.

for what it's worth, when i create a directory from the command line in a g+s parent with this command (with a umask of 002):

mkdir -m0770 dir1

it is created with the same permissions as the directory created by your first line of your Perl code.