From Latin perdīcem, which was borrowed from Ancient Greek πέρδιξ (pérdix). For the /d/ > /n/, compare Italian pernice.
pernaica f