in reply to Getting all subpaths from a path

You might try using a hash of hash keyed by a directory where the value is a hash of all the sub-directories or undef if this is a terminal entry. That makes editing links as easy as copying the value to a new key and deleting the old key.

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond