I ask because I'm booking separate tickets and am assessing the required connection time.
Will I need to go through immigration in Kuala Lumpur before heading to the gate for the KUL-PEN flight?
Yes, when changing between an international and a domestic flight, passport control will take place at the connection airport, in this case KUL.
Luggage will be checked through, however, except in a few countries (not including Malaysia AFAIK)