From chiral random matrix theory to chiral perturbation theory