sub get_parents { my (@p, $o); for (grep !/^$/, split ("/",$_[0])) {push(@p,"$o/$_");$o.="/$_"} return \@p; }