http://www.perlmonks.org?node_id=426114


in reply to Transforming hash (removing useless key)

As you mention you will be only returning a single key, how about:
$data = delete $data->{ (keys(%$data))[0] };
HTH
--
Olivier