SPUG: Yet another silly question
Brian Wisti
wbrian2 at qwest.net
Sat Jan 19 17:12:52 CST 2002
Hi Susanna,
Here's one way:
my $dirname = "foo";
unless (-e $dirname) {
mkdir ($dirname) ||
die("Cannot create directory '$dirname': $!\n");
}
There's probably a few other ways, Perl being what it is :-)
Brian Wisti
On Saturday 19 January 2002 02:22 pm, you wrote:
> Ok, I am trying to figure out the coding for checking to see if a directory
> exists and if it doesn't, create it. I've gotten out my "Perl For Dummies"
> book and did a lot of searching and am still stumped. Anyone have a quick
> and easy answer for me?
>
> Thanks!
>
> Susanne Bullo - Sweet Homes
--
------------------------------------------------------------
Visit http://www.coolnamehere.com/
It'll kill some time.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://zipcon.net/spug/
More information about the spug-list
mailing list