What I have is a list of file paths:
What I'd like to get is something like the following:
$paths=Array( file0.txt=>file0.txt, dir1=>Array( filea.txt=>filea.txt, fileb.txt=>fileb.txt, dir1=>Array( filec.txt=>filec.txt ) ), file1.txt=>file1.txt, file2.txt=>file2.txt );
It strikes me that this must be a fairly common requirement so it must've been solved plenty of times.
However, I'm not finding it easy to get my head round it.