  Light undergoes perturbation as gravitational waves pass by. This is shown by
solving Maxwell's equations in a spacetime with gravitational waves; a solution
exhibits a perturbation due to gravitational waves. We determine the
perturbation for a general case of both light and gravitational waves
propagating in arbitrary directions. It is also shown that a perturbation of
light due to gravitational waves leads to a delay of the photon transit time,
which implies an equivalence between the perturbation analysis of Maxwell's
equations and the null geodesic analysis for photon propagation. We present an
example of application of this principle with regard to the detection of
gravitational waves via a pulsar timing array, wherein our perturbation
analysis for the general case is employed to show how the detector response
varies with the incident angle of a light pulse with respect to the detector.
