in reply to Reorganizing the content of a file

Hi, I can't be sure from your sample data how the mappings are supposed to work. There's no 'name5' in the input. Please show some code you've tried in an SSCCE.

Also consider why you need to store the full paths if each node can only have one parent: don't you only need to store the direct parent for each?

Also, consider looking on the CPAN for modules that handle this kind of data path mapping.

Hope this helps!


The way forward always starts with a minimal test.