Perejil and its English version parsley sound very different. But they are, actually, etymologically the same word.
They sound different because often the -s- and -sh- sounds in Spanish turned into the letter -j- with the Arabic throat-clearing sound as a pronunciation. Thus, the p-r-j-l of perejil maps exactly to the p-r-s-l of parsley.