sanjeevappa
08-19-2005, 02:40 PM
Hi,
As new to perl iam not getting how to write a perl program to create folder structure.
For this i have a input text file, containing content like this :
A,B
A,C
B,X
B,Y
C,M
C,N
X,P
X,Q
By reading this file i have to write a perlprogram in such a way that :
A should be top folder, in that B & C subfoldrs .
In folder B, X & Y folders should be creatd.
Inside C, M & N folders.
Like that in X P & Q folders, the input file may contain any number of folders.
After Searching i got one perl Function somethink mkfolder(....) it takes possible paths.
For this i have to read the input file make things like below.
A/B/X/P
A/B/X/Q
A/B/Y
A/C/M
A/C/N
These paths if i pass to that function it will automatically create folder structure.
If any one give program for this it will help a lot.
Thanking in advance,
San.
As new to perl iam not getting how to write a perl program to create folder structure.
For this i have a input text file, containing content like this :
A,B
A,C
B,X
B,Y
C,M
C,N
X,P
X,Q
By reading this file i have to write a perlprogram in such a way that :
A should be top folder, in that B & C subfoldrs .
In folder B, X & Y folders should be creatd.
Inside C, M & N folders.
Like that in X P & Q folders, the input file may contain any number of folders.
After Searching i got one perl Function somethink mkfolder(....) it takes possible paths.
For this i have to read the input file make things like below.
A/B/X/P
A/B/X/Q
A/B/Y
A/C/M
A/C/N
These paths if i pass to that function it will automatically create folder structure.
If any one give program for this it will help a lot.
Thanking in advance,
San.