higher order perl