in reply to make_path for creating directory tree
It sounds like your question is about program logic, not about creating folders or using make_path. Sorry if I am mistaken.
It sounds like you need nested looping to do what you want. Also read up on range operators.
# hash defining your folder patterns my %patterns = ( AB => 30, BC => 50, CD => 42, ); foreach my $pattern ( keys %patterns ) { foreach my $folder ( 1 .. $patterns{ $pattern } ) { # construct the folder name using the value of # $pattern, the value of $folder_name, and sprintf() # use make_path() or whatever to create the folder foreach my $subfolder ( 1 .. 100 ) { # construct the subfolder name # create the subfolder } } }
Hope this helps!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: make_path for creating directory tree
by fasoli (Beadle) on Dec 23, 2015 at 17:18 UTC |