They've had an association with camels, stemming from O'Reilly's first book about the language, Programming Perl, with a camel on the cover. And that's trademarked.
The Perl Foundation sidesteps it by having a logo of a (pearl) onion, which is also useless because nobody associates with Perl with onions.
So this is perhaps a third way - it's a camel, it's not the camel that might cause confusion with O'Reilly's book.
The onion has been a metaphor for Perl for a couple of decades now. It was in the Camel Book, though I am not sure it was in the first edition. Larry Wall’s annual talk was (is? I stopped following) the State of the Onion. See for example
https://www.perl.com/pub/2006/09/21/onion.html/
https://archive.fosdem.org/2016/schedule/event/teachingperl/