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