Heinz Doofenshmirtz (2nd Dimension)

"Since you have neglected to take over your Tri-State Area, I think I will go over there and give it a shot myself."

- 2nd Doofenshmirtz explaining to his original counterpart of his next grand scheme

"Ha ha ha ha! I got you, and I got your little friends too. Game over! You lose, I win! Mark this the hour of your doom, Perry the Platypus!"

- 2nd Doofenshmirtz after capturing Perry and his owners

2nd Dimension Heinz Doofenshmirtz is the main antagonist of the 2011 TV film, Phineas and Ferb: Across the 2nd Dimension, and later as one of the two main antagonists (the other is his wife) in Tales from the Resistance: Back to the 2nd Dimension. He is an alternate reality version of Heinz Doofenshmirtz, but unlike his original counterpart, he happens to be more evil, intelligent, and successful, as he was able to take over his Tri-State Area and rule it with an iron fist for five years.

Like all of Doofenshmirtz's counterparts, he is voiced by Dan Povenmire, one of the co-creators of the series.

Backstory
Unlike the original Doofenshmirtz, 2nd Doofenshmirtz had a perfect childhood. However, he soon lost his favorite childhood toy train, which took a toll in his emotions, molding him into the villain he is now. He grew up to be an evil scientist in general, and moved to Danville, where he would meet and marry the love of his life, 2nd Charlene, who would later give birth to their daughter 2nd Vanessa. And just like the original Doofenshmirtz, he created his own evil company and developed a goal to take over the Tri-State Area by creating and mass-producing an army of giant robots called the Norm-Bots. During the time, he was being assigned with a nemesis, the 2nd Dimension Perry the Platypus of the O.W.C.A. sent out to stop him. However, being far more intelligent and devious than the O.W.C.A. thought, 2nd Doofenshmirtz manages to defeat 2nd Perry and transformed him into Platyborg.

2nd Doofenshmirtz unleashes his army of Norm-Bots into the Tri-State Area, finally succeeding in his goal. All of the businesses in the Tri-State Area are now under the control of his company, and ever since then, 2nd Doofenshmirtz has been ruling the Tri-State Area with an iron fist for five years, with the Norm-Bots serving as his major forces and Platyborg serving as his new general and second-in-command. During his reign, one of the citizens, 2nd Dimension Candace Flynn, had enough and founded a resistance group to fight and put an end to Doofenshmirtz's reign. 2nd Doofenshmirtz's feud against the Resistance mirrors to those between the original Doofenshmirtz and Perry. However, 2nd Doofenshmirtz manages to maintain his rule over the Tri-State Area, leaving the Resistance with no success. Also, in order to provide benefits for his family, he and 2nd Charlene (who turns out be just as evil and intelligent as him) pretended to be divorced to gain financial advantages (such as tax records, coupon mail, junk yard sales, and separate vacation trips) during his reign.

Across the 2nd Dimension
When the original Doofenshmirtz built in a machine called the Other Dimension-inator (with the help from Phineas and Ferb) to help him travel to alternate dimensions, they end in the 2nd Dimension, where Doofenshmirtz meets his 2nd Dimension self. The two bonded and even sang a musical number together. However, this was cut short when 2nd Doofenshmirtz realized that his original counterpart had unintentionally brought the original Perry (who is in pet mode) since he is Phineas and Ferb's pet. Recognizing Perry as a secret agent, the angry 2nd Doofenshmirtz manages to expose his identity to the boys, who then become angry at Perry for using them as a cover story, much to Perry's dismay.

Phineas, Ferb, and Perry are then forced to run from 2nd Doofenshmirtz and his Norm-Bots, attempting to go back to their dimension. Later on, 2nd Doofenshmirtz learns that his original counterpart is an incompetent halfwit since he couldn't recognize Perry without the fedora hat, and pointed that this is partially why Doofenshmirtz always failed in almost all of his schemes. He explains to Doofenshmirtz that true villainy comes from a tragic backstory before telling his own, though this was clearly was not so tragic compared to Doofenshmirtz's miserable childhood.

At that point, 2nd Doofenshmirtz decides to come up with his next plan: to use Doofenshmirtz's Other Dimension-inator to lead an invasion on the original Tri-State Area. To avoid any interference from Perry, 2nd Doofenshmirtz forces the platypus to turn himself in so that he won't hurt Phineas and Ferb. He then gets Doofenshmirtz to create another replica of the -inator, but is angered to realize that it won't work since Phineas and Ferb were the ones who actually made it work with their intelligence. Because of this, 2nd Doofenshmirtz decides to renege on his word with Perry, and plans a clever ruse to capture the boys: publicly announcing that he is going to transform Perry into a cyborg. Not wanting to let this happen (despite their previous anger towards Perry), Phineas and Ferb head over to rescue Perry, but end up being captured along with their sister Candace.

2nd Doofenshmirtz orders the boys to fix the machine, but they refuse, explaining why they would do something that would lead to their own self-destruction. It was then Doofenshmirtz realized that what the boys only did was taking out his self-destruct button, which Doofenshmirtz wired everything to. This allowed the machine to power up, and a delighted 2nd Doofenshmirtz decides to send Perry and the kids to their doom by having them fed to a monster known as the Goozim. He also attempts to have Doofenshmirtz fed as well for his utter annoyance, much to Doofenshmirtz's dismay. However, this was foiled by the efforts of an arriving 2nd Candace, allowing Doofenshmirtz, Perry, and the kids to escape back to their original dimension.

Despite the five returning back to the 1st Dimension, 2nd Doofenshmirtz has already captured 2nd Candace and unleashed his Norm-Bots onto the original Tri-State Area. Though Phineas and Ferb manage to get their friends to fight against the robots, 2nd Doofenshmirtz sends in more Norm-Bots before engaging into a fight against Phineas while Perry deals with Platyborg. After Perry manages to defeat Platyborg by sending him to fry on an electrical socket, he and Phineas manages to knock down the satellite controlling the robots, causing them to deactivate. However, that didn't stop 2nd Doofenshmirtz, who then brands a giant robot version of himself to kill Phineas, Ferb, and Perry as revenge for foiling his plans. However, before 2nd Doofenshmirtz could deliver the final blow, Doofenshmirtz arrives to rescue both the boys and the platypus by angrily ordering his evil counterpart to stop.

After getting 2nd Doofenshmirtz's attention, Doofenshmirtz presents out his toy train and gives it to him in an effort to resolve his backstory. Touched by this, 2nd Doofenshmirtz spares both boys and the platypus, renounces his evil ways, and destroys the remaining Norm-Bots with a self-destruct button to clean up the mess he had done. Personally agreeing never to come back to the original dimension again, 2nd Doofenshmirtz returns back to his dimension, only to be arrested by the O.W.C.A. and imprisoned for his crimes against humanity. Following 2nd Doofenshmirtz's arrest, Platyborg is relieved of his evil programming and goes back to being 2nd Phineas and 2nd Ferb's pet.

Tales from the Resistance
It's been two months ever since 2nd Doofenshmirtz was defeated and arrested. He is first seen held in prison with his toy train. Following an attack at Danville Park by two giant insect robots and the kidnapping of Platyborg by several animal cyborgs called the Animal-Borgs, 2nd Candace came by for a visit in his cell, demanding to know why he sent those robots and cyborgs to attack the kids. At first, 2nd Doofenshmirtz denies that he had anything to do with the attack since he was in his cell when it happened, but later reveals that it was his 'ex-wife' 2nd Charlene who did the job, since she was responsible for capturing many of O.W.C.A's agents and transforming them into ruthless cyborgs during his reign, similar to how he defeated 2nd Perry and transformed him into Platyborg.

During the course of the episode, 2nd Doofenshmirtz is forced to help 2nd Candace (who threatens to take his toy train away while he can still remain in prison) to lead her to 2nd Charlene's penthouse. Eventually, after reaching there, 2nd Doofenshmirtz and 2nd Charlene revealed to 2nd Candace that they are still married and their true reasons why they pretended to be divorced. Also, 2nd Charlene revealed that the kidnapping and the park attack were nothing but ruses to trick 2nd Candace into getting 2nd Doofenshmirtz to the penthouse to free him. Taking the opportunity, 2nd Charlene sets her Animal-Borgs to hold the trio prisoner, freeing 2nd Doofenshmirtz. 2nd Charlene is also annoyed of having her husband of setting his attention on his silly childhood toy train so she throws it away, resulting 2nd Doofenshmirtz to go back to his evil ways. Eventually, 2nd Candace, 2nd Phineas, and Platyborg are freed by 2nd Ferb, who pretended that he was turned into a cyborg by 2nd Charlene, revealing that he and 2nd Phineas planned up a frontal attack on 2nd Charlene's penthouse for the arriving Resistance to free the animal cyborgs of their evil programming (with specialized fedora hats equipped with deprogramming magnetic chips) and take the evil Doofenshmirtz couple into custody.

Eventually, all of the Animal-Borgs were freed of the evil programming by the arriving Resistance (except for Peter the Pandaborg) and 2nd Doofenshmirtz and 2nd Charlene are about to be put into custody as the animal cyborgs hold them up in gunpoint. However, the arriving 2nd Vanessa tricks 2nd Candace into letting her have a moment with her evil parents, which allowed the entire Doofenshmirtz family and Pandaborg to escape in a hover car driven by 2nd Vanessa's boyfriend Tony Marzulo. As the notorious Doofenshmirtz family escape, 2nd Doofenshmirtz recognizes Tony as the boy he banished earlier because of his interest towards 2nd Vanessa, to which 2nd Charlene confirmed, stating that nobody saw it.

Trivia

 * He is one of the three counterparts of Doofenshmirtz shown to be competent in doing evil (the others are Malifishmertz and 1914 version of Doofenshmirtz.