Perrin saw service with Gregg's Brigade through all of its major battles, including the Seven Days, Second Bull Run (Second Manassas), Antietam, and Fredericksburg. When Gregg's successor, Samuel McGowan, was wounded at Chancellorsville, Perrin took command of the brigade and led it at the subsequent Battle of Gettysburg in the division of Maj. Gen. William Dorsey Pender in Hill's new Third Corps. At Gettysburg, on July 1, 1863, Perrin's brigade was involved in the Confederate attack that captured Seminary Ridge. On September 10, 1863, Perrin was promoted to the rank of brigadier general. Upon the return of McGowan, Perrin was transferred to command the Alabama brigade previously led by Brig. Gen. Cadmus Wilcox in the division of Maj. Gen. Richard H. Anderson (Wilcox had been appointed to command the division of Pender, who had died from a wound received at Gettysburg).