in reply to WWW::Wordnik::API output
The output seems to be a serialized structure. I suggest you first convert it to a HashRef using the Data::Serializer::Raw module in conjunction with Data::Dumper.
For example, you can do this:
# Creating a serializer using Data::Dumper my $serializer = Data::Serializer::Raw->new( 'serializer' => 'Data::Du +mper' ); my $hashref = $serializer->deserialize( $content );
Then it will be easier to process as a HashRef.
UPDATE: I see your structure is JSON, let me give you another answer. The principle is the same, convert your JSON to a HashRef, using the JSON module:
use JSON; my $hashref = from_json( $content );
I do this all the time! Much easier to deal with as a HashRef!
Testing never proves the absence of faults, it only shows their presence.
-- greengaroo
In Section
Seekers of Perl Wisdom