in reply to How to access struct of structs

just a guess, but I think you want:
print $dir->name . '/' . $fi->name;
instead of print $dir->$fi->name;
Boris