It turns out CTRL-P was in fact working, but not in the way I expected.
The tty version of nethack displays a list of recent messages on the right side of the screen when using the command - so this is what I was expecting it to do. However, The offline version simply repeats the last message (or the ones prior to it) at the top of the screen.
Because I was trying different CTRL, SHIFT, P combinations, I obviously used the put-on command ( SHIFT-P) at least once. Then when I tried CTRL-P, the command was doing its job by displaying a recent message but it looked like it was merely interpreting it as another put-on command. Of course, I realised my mistake when I did other actions in the game which displayed different messages and tried CTRL-P again.
EDIT: As hobbs pointed out, I hadn't set
reversed) and therefore wasn't getting the functionality I was used to when playing on the server.
I had to create a new configuration file,
OPTIONS=msg_window:reversed and everything worked as expected.