Working as expected, and the npc would gain the perk, and it could be confirmed using the "hasperk" command
More recently, the console stopped providing output when I try, and if using the "hasperk" command, it shows the intended perk as still having a rank of zero.
I have tried enable/disable on the npc in question with no effect.
player.addperk is still working, but I have no intention of using it to add perks to myself, as I get them by leveling.
Has anyone encountered this and is there a fix?