They're both intimately connected, and the Pali word for perception, sanna
, can be translated as 'the act of remembering.' Perceptions are the mental labels we apply to things that arise in our experience, and memory is an integral part of that:
"And why do you call it 'perception'? Because it perceives, thus it is called 'perception.' What does it perceive? It perceives blue, it perceives yellow, it perceives red, it perceives white. Because it perceives, it is called perception. (SN 22.79)
The way I see, there isn't a sharp distinction, although I'd say memory can be a more passive mental phenomenon whereas perception a generally a more active process, sort of like directed memory or the act of noting what arises in our field of awareness.