player.advskill <skill> <base XP
> until next skill level (via trial & error), then
player.setav <skill> <level> back to original skill level.
I don't know how to prevent the resulting character level XP. The effect could be minimized by setting the skill level to the lowest before levelling it up (then setting it back to the original level).
To remove a resulting perk point, spend a perk point, then
removeperk <perk ID>.
To find the perk ID code in-game, try
help <perkname> 4.
Quotation marks are required for queries of more than one word (e.g., help "ancient nord").
For perk ID codes, see the page for the perk's corresponding skill, indexed at Skills.
Important note: To remove perks from an established tree, you will need to backtrack through the entire tree. Meaning, start from the top and work your way down. In perks with ranks, you will need to remove rank 5/5, then 4/5, etc. Also, using removeperk will only remove the perk. It will not refund the perk points.
player.removeperk 000babe8 will remove Barbarian rank 1/5.