Texas Gov. Rick Perry said he will appeal the ruling.