While working on the animated television series Rocko 's Modern Life , Phineas and Ferb coed @-@ founder Dan Povenmire and Jeff " Swampy " Marsh utilized several recurring elements in the episodes that they wrote . Among these was actions sequences and chase scenes . Povenmire and Marsh wanted to reuse these elements in their series and chose Perry to execute it . The pair gave him a consistent and continuous nemesis in the form of Doofenshmirtz as a means of allowing viewers to get to know him .