Indeed - one of the first wars fought with modern rifling, the American Civil War, had General Lee learn this lesson in a very hard way on the last day of the Battle of Gettysburg, in a failed infantry assault known as "Pickett's Charge."[0]
Lee mistakenly attacked a position that was very easily defensible by Union artillery on faulty theory that it would be weakened due to a (failed) artillery barrage that happened previously. The Union correctly predicted Lee would attack there, and he sent over 12,000 men in a futile assault that resulted in 50% casualties in less than 1 hour, one of the bloodiest hours of the entire war.