Motivated by a problem in computer architecture we introduce a notion of the perfect distance-dominating set, PDDS, in a graph. PDDS s constitute a generalization of perfect Lee codes, diameter perfect codes, as well as other codes and dominating sets. In this paper we initiate a systematic study of PDDS s. PDDS s related to the application will be constructed and the non-existence of some PDDS...