Hi,
I usually don't have any problems parsing complicated text data in Perl, but this one has me stumped. My data basically describes a multidimensional hash, where the number of tabs (actually 4 spaces equates a tab in this case) at the beginning of each line and order represents its place. I realise I will likely need some kind of recursive routine, but it quickly becomes apparent I am going in completely the wrong direction every time I try something and haven't come anywhere close to a working solution. I understand its common courtesy to provide what I have tried so far, but in all honesty my attempts have been worse than useless and would be completely unhelpful to anyone. I'm more than happy with just some advice in response.
Regards,
Chris
Input:Expected output (Dumper $hash):one two three four five six
$VAR1 = { 'five' => { 'six' => undef }, 'one' => { 'three' => { 'four' => undef }, 'two' => undef } };
In reply to Parse data representing hash by peterp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |