in reply to Re^2: String parsing
in thread String parsing

Hashes will sort out uniqueness independently of how random the input is.

The only problem you'll run into is that things like System_Config would be split into two (unlike what you seem to want according to your sample), even if you stop splitting after 4 underscores (which is the minimum depth required for getting a separate L2 entry). So you'd have to invent some additional logic to determine how deep to split...

Replies are listed 'Best First'.
Re^4: String parsing
by Anonymous Monk on Mar 25, 2010 at 20:09 UTC
    The logic would be in the displayer. If the hash has one element, join with the parent with an underscore. It works in all the OP's cases.