In 2001, the comedy/fantasy/drama Scrubs introduced audiences to the wildly zany world that is Sacred Heart Hospital and it's most reluctant inhabitant, Dr. Perry Cox. Thanks to his role as the hospital mentor, the brilliant, curmudgeon-like doctor with anti-social personality traits is one of the show's greatest resources for its comedy as well as its heart.

RELATED: 15 Quotes From Scrubs That Are Still Hilarious Today

Beneath his harsh exterior lies a quiet method to his madness, as he always knows when to push the hospital newbies and when to pull back. Though his proteges inherit the brunt of his torment, they also benefit the most from his teachings.

"You're Chief Resident Too."

Dr. Cox is nothing if not devious, as evidenced when he puts J.D. through anguish over his Chief Resident pick. Having to choose between the only two applicants, J.D. and Elliot, Dr. Cox first declares that Elliot is the winner.

After witnessing J.D.'s hissy fit, Perry then reveals J.D. will be Chief Resident too, forcing the quarreling lovers to learn to work together. Having only wanted to see J.D.'s reaction first, Dr. Cox points out the positive qualities in each person that led him to pick both.

"You're Doing Fine There."

The ongoing battle between Chief of Medicine Bob Kelso and the ever-insubordinate Dr. Cox is one of the show's most entertaining storylines. In the Season 2 finale "My Dream Job," he and J.D. walk into the hospital lobby to find Dr. Kelso verbally assaulting Elliot.

After a pep talk from J.D., Perry comes to Elliot's rescue and punches Bob in the face. He then reassures Elliot that she's doing a great job. Though both Bob and Perry would likely be fired in real life (or in Perry's case, arrested), in the hyper-realistic world that Scrubs inhabits, it's a beautiful moment.

"You Can Do This."

Scrubs Dr. Cox – You Can Do This

One of the most important things for any young professional to have is confidence, which J.D. establishes right away that he lacks. On his first day, his fears are initially assuaged by Dr. Kelso, whom J.D. immediately interprets as his "safety net."

Meeting Dr. Cox on the other hand leaves J.D. feeling belittled and wanting. When J.D. later learns of Kelso's two-faced nature, he's confused as to who the real good guy is. A crashing patient brings him to Dr. Cox's aid, allowing Dr. Cox to take J.D. under his wing with the words "J.D., look at me. You can do this."

"Don't Be Late Tomorrow, Doctor."

Dr. Cox looking at someone

At the end of his residency, J.D. attempts to coerce Dr. Cox into teaching him one more lesson but Perry instructs him he needs to get used to being on his own. Dr. Cox then secretly uses reverse psychology on J.D. to help with a patient, which the new psychiatrist points out to J.D., along with the fact that he still desperately seeks validation and a hug from Perry.

RELATED: Scrubs: 10 Unanswered Questions We Still Have About The Main Characters

J.D. confronts Perry over the reverse psychology and Perry offers him a fake hug, only to pull it back and inform J.D. he's not done teaching him. He ends the conversation by calling J.D. a doctor for the first time.

"The Hospital Comes First."

Part of Elliot's character arc is learning how to fend for herself. She was raised in a very affluent household and was subsequently provided for her whole life by her absentee parents, which leads to constant conflicts with Dr. Cox.

After getting dolled up at the hospital for a date, Perry confronts her about leaving despite her patient needing a complicated procedure. He disregards her pleas and explains that the hospital always comes first. He later empathizes by relating a story of missing important moments with his son because he too was working. Though past-Elliot would've crumbled, new-Elliot manages to utilize his advice and learn how to better maintain her work-life balance.

"You Are Evaluated."

Cox and JD

In the Season 1 episode "My Fifteen Minutes," Perry asks J.D. to fill out his own intern evaluation, claiming he's too busy to do so. J.D. refuses and stands up for himself, telling Dr. Cox it's his responsibility, to which Perry reluctantly agrees.

Perry later gives J.D. an impassioned lecture on why he asked him to evaluate himself: "I wanted you to think about yourself. I mean really think. What are you good at? What do you suck at? I wanted you to put it down on paper, not so I could see it and not so anybody else could see it but so you could see it! You only have to answer to one guy, newbie, and that's you! There...you are evaluated." What J.D. doesn't know is Perry later gives him a glowing evaluation to the hospital board.

"It Was Luck."

Scrubs Dr. Cox – It Was Luck

Emboldened by proving Dr. Cox wrong on a diagnosis, J.D. becomes egotistical and antagonistic towards his mentor. Perry responds by picking two identical patients and having each treat one to prove it was a fluke.

When J.D.'s patient dies, Dr. Cox attempts to help him understand why but is angrily rejected. Having begun to obsess over what happened, J.D. learns the harsh truth that though he's progressing, he still needs help as a doctor. In a heartwarming moment, Perry finds his protege and explains to him that although J.D. did everything right, luck was the determining factor. Considering his obsessive personality traits, it's an extremely valuable lesson for J.D. to learn.

"You're Not Fit To Work."

Scrubs Dr. Cox – You’re Not Fit To Work

"My Dream Job" is a bombshell episode for Dr. Cox. Before punching out his supervisor, he learns that the baby his ex-wife is several months pregnant with is his; to make matters worse, he learns this from Turk and J.D.'s college buddy Spence.

RELATED: Scrubs: Every Season Ranked, According To IMDb

After subsequently shunning Jordan for not telling him, Perry finds out Turk and J.D. came into work drunk after partying with Spence. He gives them a brutal tongue lashing and sends them home. Already feeling disillusioned with his job, J.D. takes out his anger on others before realizing that being a doctor requires greater commitment. Dr. Cox also comes around, relenting to Jordan's wish to reconcile and apologizing to J.D., even giving him a back-handed compliment.

"Why We Make Jokes."

Scrubs Dr. Cox – Why We Make Jokes

It's little secret that Dr. Cox dislikes Turk, but this doesn't stop him from finding a teaching moment in their rivalry. After Turk implies Perry is insensitive and robotic towards patients, the pair bet on a patient living or dying through surgery.

Turk wins the bet and celebrates emphatically, which clearly annoys Perry. When he later learns Turk embarrassed himself in front of a dead patient's family at a funeral, he responds gleefully. Carla implores Dr. Cox to fix things with Turk, so they go to a room where Turk's senior doctor, Dr. Wen, is giving a family bad news. Perry points out how Dr. Wen is going to have to go back to work after the conversation and explains that's why they distance themselves and make jokes: it's not to be insensitive, it's to simply get by.

"Thank You."

Scrubs Dr. Cox – Thank You

The emotional two-episode arc "My Lunch/My Fallen Idol" finds J.D. feeling guilty for failing to prevent a longtime patient, Jill Tracy, from overdosing. Dr. Cox comforts him with reminders not to blame himself. J.D. recovers and Jill's organs go to three transplant patients. Tragically, the autopsy results show Jill had rabies, meaning the transplant patients are now infected. Dr. Cox works desperately to save them and, in spite of his best efforts, all 3 patients die.

Perry becomes heavily depressed and spends the next several days drinking alone. The group takes turns visiting him but J.D. initially refuses, claiming he's mad at Perry for showing up to work drunk. He finally relents and visits his tormented mentor, confiding that he wasn't in fact mad, but scared. Perry learns J.D. still looks up to him and wants to be the kind of doctor he is, the kind who cares this hard when patients die. This lifts Perry out of his depression, and at his recovery party, he privately walks up to J.D. and thanks him for his support.

NEXT: Scrubs: 10 Moments Elliot Stole Our Hearts