sub assign_ME_problem { my( $ontCategory, $ontNumbering, $mapwd ) = @_; local( %problemClassProps ) = %problemClassProps; # localize a copy markFail( $mapwd, $ontCategory, $ontNumbering ); %MEClassProps = %problemClassProps; # copy to your hash 1 }