thesaurus reports the following when I type in "perla":
1. f. margarita, aljˇfar. La perla peque˝a y de figura
irregular se llama aljˇfar.
If I'm interpreting Babelfish correctly, margarita = small pearl. "Pearls before swine" comes from the bible, (Matt 7:6, apparently: "Do not give what is holy to the dogs; nor cast your pearls before swine, lest they trample them under their feet, and turn and tear you in pieces" -- thank you, Google
), where I presume the original text used the word "pearls" and not "daisies". If that's true, then the etymology may be reversed, and the Spanish word for the flower was taken from the name of the jewel.