in reply to Finding directories at a variable depth

You could just use glob, if you construct the right match string

my @files = glob('/*/*/*');

That will give you all the files like

/a/b/c /a/b/d /a/x/a ...