Computing.Net > Forums > Web Development > use PERL to create folder

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

use PERL to create folder

Reply to Message Icon

Name: jackwong
Date: January 8, 2005 at 15:50:15 Pacific
OS: winXP
CPU/Ram: 256MB
Comment:

Hello,

Is there a way that I can use PERL to creat a new folder on a server? So I don't have to creat the folder by hand. Any help will be appericated!

Jack



Sponsored Link
Ads by Google

Response Number 1
Name: FishMonger
Date: January 10, 2005 at 18:23:26 Pacific
Reply:

Do you mean other than the mkdir command?

C:\>perldoc -f mkdir
mkdir FILENAME,MASK
mkdir FILENAME
Creates the directory specified by FILENAME, with permissions specified by MASK (as modified by "umask"). If it succeeds it returns true, otherwise it returns false and sets $! (errno). If omitted, MASK defaults to 0777.

In general, it is better to create directories with permissive MASK, and let the user modify that with their "umask", than it is to supply a restrictive MASK and give the user no way to be more permissive. The exceptions to this rule are when the file or directory should be kept private (mail files, for instance). The perlfunc(1) entry on "umask" discusses the choice of MASK in more detail.

Note that according to the POSIX 1003.1-1996 the FILENAME may have any number of trailing slashes. Some operating and filesystems do not get this right, so Perl automatically removes all trailing slashes to keep everyone happy.


0
Reply to Message Icon

Related Posts

See More


bulk emailer problem Frame Help!!!



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: use PERL to create folder

What do I use to create a Forum www.computing.net/answers/webdevel/what-do-i-use-to-create-a-forum/1187.html

How To Create Webpage very Graphica www.computing.net/answers/webdevel/how-to-create-webpage-very-graphica/589.html

a program to create glossy images?? www.computing.net/answers/webdevel/a-program-to-create-glossy-images/1926.html