in reply to Re^5: Help extracting pattern of data
in thread Help extracting pattern of data

Thankyou Anomalous! It helped. I had to modify it a bit as it did not allow me to take it as an array. But the below code worked :)
while(my $k = each %$structure) { for my $field (@fields){ print qq{$field = $structure->{$field}\n }; } }

I will now try to work on manipulating the data from the fields output and get back if I have questions. Thanks a lot for your advice n help :)

Replies are listed 'Best First'.
Re^7: Help extracting pattern of data
by spikeinc (Acolyte) on Jan 27, 2014 at 08:17 UTC
    hey, I am having some trouble looping through the structure. The above code was fine when I had one entry of json data. But its printing the same line as many times as each key in $structure. How can I loop such that I print unique entries from the structure.
      Closing this thread, opening another one so as to organize.