my $a = "/aaaa/bbbb/cccc/dddd/index.html"; my ($clean_path) = $a =~ /(.*\/)/; my @dir_split = split /\//,$clean_path; my $stringer; foreach (@dir_split) { $stringer .= $_."/"; say $stringer; }
In reply to Alternative for a directory builder by cyber-guard
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |