When, however, the Civil War began, he volunteered into the navy, was rated acting master's mate, and became a midshipman in October 1861, and a lieutenant in July 1862, serving in the North Atlantic blockading squadron.
He became a midshipman in the United States navy in 1829, and was in the coast survey in 1836-1842.
He entered the navy as midshipman (1799) with his father, Christopher Raymond Perry (1761-1818), a captain in the navy, and saw service against the Barbary pirates.
He entered the United States Navy as a midshipman in 1818, and became a lieutenant in 1826.
He graduated from the U.S. Naval Academy in 1881, served two years as midshipman, then resigned from the navy and became a civil engineer.