Presumably from a verb pern, a variant of preen, from Middle English prene; pernyng is read by some editors in Sir Gawain and the Green Knight (v. 611) and interpreted as the present participle of this verb, also reflected dialectally as pirn. See also pirl.
19th century, after the taxonomical name Pernis (Cuvier 1816).