sub process_data { my $rData = shift; # Fetch the reference to the $json data my $json = { %$data }; # Make a copy of it . . . the rest of the subroutine . . . }