Oh God, I would never get over that. You can complain to the Supermarket, but the only compensation you can expect would be some vouchers. I complained to Tesco about one of their ready meals, which contained loads of splintered bone. They sent me a �5 money card that can be spent in store.
I would send them the pear if possible, put it in a sealed jar and then box it up with polystyrene bits or torn newspaper, also request a refund of your mailing costs.
I always check fruit carefully for holes on the outside whilst washing them, usually that is a sign that something is living inside, but I know how you feel, years ago, I was eating an apple whilst watching TV in the dark, but had a strange feeling that I should put the light on. I did and my next bite would have been the maggot inside it. I didn't eat apples again for years and if I do, like to cut them up first.