Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
What I need to do is turn it into something like:my $data_struct = [ 'D', [ 'C', [ 'D', [ 'C', [ 'D', 'E' ], 'E', [ 'B' ] ], 'E', [ 'B', [ 'C' ] ] ], 'E', [ 'B', [ 'C', [ 'D', 'E' ] ] ] ], 'E', [ 'B', [ 'C', [ 'D', [ 'C', 'E' ], 'E', [ 'B' ] ] ] ], 'B', [ 'C', [ 'D', [ 'C', [ 'D', 'E' ], 'E', [ 'B' ] ], 'E', [ 'B', [ 'C' ] ] ] ] ];
I've banged my head on this for a while, any input/hints would be greatly appreciated.my $flattened = [ [D, C, D, C, D], [D, C, D, C, E], [D, C, D, E, B], [D, C, E, B, C], etc.. ]
|
|---|