Royals’ Perez undergoes Tommy John surgery