convert UA response from json to perl