in reply to Re^3: make_path for creating directory tree
in thread make_path for creating directory tree
Ok I just finished studying this :) I understand everything now and I will read on subs, map and printf. Thank you so much! :)
edit: Actually I was thinking I'd like to make it a bit more "organised" especially in case I add more subfolders in the future, so I made this slight change (nothing really, just specified the subdirectories in the beginning). It looks like it's correct and the result is what I want - sorry, just getting paranoid that I might have messed the subroutine up, that's the only reason why I'm posting this tiny change.
my @dirs = ( dir_tree( 'AB', 6, 1, 2 ), dir_tree( 'BC', 6, 1, 2 ), ); my @subdirs = ( dir_tree( 'F', 6, 1, 5 ), ); for my $dir (@dirs) { for my $subdir (@subdirs) { print "/results/$dir/$subdir \n"; } }
|
|---|