SPUG: test directory and then create

Ben Burnett BenB at ocentrix.com
Wed Jan 9 17:51:46 CST 2002


Sorry about the missing attachment.

Hey Garret,

Long time no see.

Read through the comments in the attached script and then give it a try.

--- Ben Burnett
Information Architect
Ocentrix
220 W Mercer St. #200
Seattle,  Wa 98119
Phone:    206.625.9393
Direct:   206.691.7602
Fax:      206.625.1890


> -----Original Message-----
> From: garrett esperum [mailto:shamonsflame at hotmail.com] 
> Sent: Wednesday, January 09, 2002 2:59 PM
> To: spug-list at pm.org
> Subject: SPUG: test directory and then create
> 
> 
> Hello all,
> 
> I am using solaris 2.6 and perl 5.6.1.
> I have an external file that has multiple directory names 
> listed in it. The 
> directory names in this file are seperated by a tab. I want 
> to read this 
> external file and I want to test to see if each of these 
> directories exists. 
> If these directories don't exist I want to create them. If 
> they do exist I 
> don't want to do anything.
> How do I do this in PERL? How do I do the dir test? And how 
> do I perform the 
> loop?
> 
> Thank You!
> 
> -garrett
> 
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
> 
> 
>  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> - - - - - - -
>      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/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: dirtester-maker.pl
Type: application/octet-stream
Size: 868 bytes
Desc: dirtester-maker.pl
Url : http://mail.pm.org/archives/spug-list/attachments/20020109/39b133dd/dirtester-maker.obj


More information about the spug-list mailing list