in reply to Re: Using eval, but always undef?in thread Using eval, but always undef?
It is simple (JSON).
use JSON; my $json_string = q|{ "error":{ "type":"ServiceException", "code":108, "message":"(#108) No results founds" } }|; my $perl_ref = decode_json($json_string); print $perl_ref->{error}{type}, $/; __END__ ServiceException [download]
Don't fudge it. Use the right tools. Everything else is false economy.