Answer
Matthew C. Perry was Farragut's superior during the Mexican-American War. Perry, a renowned naval commander, led the Home Squadron, responsible for blockading the Gulf of Mexico and supporting amphibious operations. Farragut served under him as the captain of the sloop-of-war USS Saratoga, gaining valuable experience and demonstrating his leadership abilities.