A wavelength dependent switch, comprising in sequence: a polarization beam splitter having a first input port, for receiving at least one input beam having at least two wavelength components, said polarization beam splitter being operative to spatially split each of said at least one input beam into a pair of beams (P y, P z) of separate polarization components; a first dispersive element receiving said pair of beams of separate polarization components, and operative to spatially disperse said wavelength components of each of said pair of beams of separate polarization components in a dispersion plane disposed at an angle to the plane in which said polarization components are split; a first focusing element receiving said wavelength components of each of said pair of beams of separate polarization components; at polarization modulating element, pixelated generally along the direction of the dispersion such that each pixel is associated with a separate wavelength component, each pixel of said polarization modulating element being operative to change the state of the polarization of light passing through said pixel according to a control signal applied to said pixel; a second focusing element receiving said light after passing through said polarization modulating element; a second dispersive element receiving light from said second focusing element, and operative to combine said separate wavelength components of each of said pair of beams into multi-wavelength beams; and a polarization beam combiner having at least one output port (40, 44), said polarization beam combiner receiving each of said pair of multi-wavelength beams, and operative to combine said separate polarization components such that each wavelength component of said at least one input beam is directed to said at least one output port in dependence on the control signal applied to said pixel associated with said wavelength, characterized in that said polarization modulating element is disposed in the focal region of said first focusing element such that the first focusing element is operable to focus said wavelength components of each of said pair of beams onto the polarization modulating element. a polarization beam splitter having a first input port, for receiving at least one input beam having at least two wavelength components, said polarization beam splitter being operative to spatially split each of said at least one input beam into a pair of beams (P y, P z) of separate polarization components; a first dispersive element receiving said pair of beams of separate polarization components, and operative to spatially disperse said wavelength components of each of said pair of beams of separate polarization components in a dispersion plane disposed at an angle to the plane in which said polarization components are split; a first focusing element receiving said wavelength components of each of said pair of beams of separate polarization components; at polarization modulating element, pixelated generally along the direction of the dispersion such that each pixel is associated with a separate wavelength component, each pixel of said polarization modulating element being operative to change the state of the polarization of light passing through said pixel according to a control signal applied to said pixel; a second focusing element receiving said light after passing through said polarization modulating element; a second dispersive element receiving light from said second focusing element, and operative to combine said separate wavelength components of each of said pair of beams into multi-wavelength beams; and a polarization beam combiner having at least one output port (40, 44), said polarization beam combiner receiving each of said pair of multi-wavelength beams, and operative to combine said separate polarization components such that each wavelength component of said at least one input beam is directed to said at least one output port in dependence on the control signal applied to said pixel associated with said wavelength,