mkdir permissions problem with perl

Testing the following perl code with local linux and apache
1.3.6 server allows creation of directories with permissions
of 755 but not 777, and on the apache 1.3.4 server of my webhost, it seems limited to a permission of just "4" for 'other', directories always result with permissions of
rwx-rx-r, and not rwx-rx-rx...This is the code, and thank you for your help:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

It is most likely due to your current umask.
It's best to leave your umask as it is and just use the chmod functions after mkdir.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
leehinklemanAuthor Commented:
chmod(0777, $lgn) worked on both local linux, and on my webhost.
Thanks very much.
Lee Hinkleman
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.