In border crisis, Perry finds a political advantage