in reply to Why does unix mkdir and perl mkdir behave differently?
The -m argument to the (presumably) GNU mkdir command makes it set the permissions disregarding the process' umask. The Perl mkdir call is just calling the bare mkdir(2) system call which honours the umask. If you don't want the umask to affect things either explicitly set it to a known value or call chmod yourself after making the directory.
Update: And with strace you can see the later is exactly what the GNU mkdir is doing underneath the hood:
$ strace -e chmod,mkdir mkdir -m0777 spoo mkdir("spoo", 0777) = 0 chmod("spoo", 0777) = 0
|
|---|