Many applications in the fields of mobile robotics and autonomous vehicles employ two or more 2D laser rangefinders (LRFs) for different purposes: navigation, obstacle detection, 3D mapping or simultaneous localization and mapping. The extrinsic calibration between such sensors (i.e. finding their relative poses) is required to exploit effectively all of the sensor measurements and to perform data fusion. In the literature, most works employing several LRFs obtain their extrinsic calibration from manual measurements or from ad-hoc solutions. In this paper we present a new method to obtain such calibration easily and robustly by scanning perpendicular planes (typically corners encountered in structured scenes), from which geometric constraints are inferred. This technique can be applied to a rig with any number of LRFs in almost any geometric configuration (a minimum of two LRFs whose scanning planes are not parallel is required). Experimental results are presented with synthetic and real data to validate our proposal. A C++ implementation of this method and a dataset are also provided.