Can chlorine form hydrogen bonds? My question is simple, If chlorine ($\ce{_17Cl^35^.^5}$) and nitrogen ($\ce{_7N^14}$) have similar values of electronegativity, and chlorine has way more lone pairs than nitrogen, what prevents it from forming hydrogen bonds ? 

(other than in chloral dihydrate $\ce{CCl3CH(OH)2)}$
Nitrogen is equally electronegative as chlorine but also more compact.  Whether you consider hydrogen bonding as purely electrostatic or having a covalent character (The lone pair on atom X overlaps the molecular orbital in the H-Y bond of an adjacent molecule, thus partially delocalizing the bond), the more compact structure of nitrogen offers an advantage.