See
tabs to html list, thats recursion (simulated).
- Replace while ( readline $fh ) with something involving File::Find::Rule
- Replace $curr = to count depth based on the path (easier with Path::Class)
- If keeping $count isn't sufficient, maybe adapt htmltreexpather.pl to generate your id/menu attribute
- ...
- profit