>     return [
>         sort { length $b <=> length $a } # reverse sorted by length
>         grep { ++$uniq{$_} == 1        } # (unique directories only)
>         map  { push @dir, $_; "/@dir"; } # a growing list of dirs
>              ($f =~ m:([^/]+)/:og)       # gathered from the current
>     ];                                   # translated filename

File::Spec has some handy methods for this kind of thing, which have the
added benefit of being platform-independent.

Doesn't Apache::Template do this too?



Reply via email to