- or download this
/file.txt
/a/file.txt
/a/b/c
/a/b/c/file.txt
/z/m/w/file.txt
- or download this
%dir_hash(
'file.txt' => '',
...
'b' => {
'c' => {
'file.txt'
- or download this
#!/usr/bin/perl
...
/a/b/c
/a/b/c/file.txt
/z/m/w/file.txt
- or download this
my $last=\\%dirhash;
$last=\$$last->{$_} for split qr|/|;