Usually, anything made with flour (other than bread) takes the before bracha-bracha for flour: mezonos"mezonos". So So, apple pie is made of flour (crust), apples, and sugar, and a usual size serving of apple pie takes the mezonos"mezonos" before blessing-blessing. See See, for example, http://berachot.org/foods/letter_a.htm for apple strudel or apple pie. The
The after bracha-bracha for a perogi depends on how much you ate. Typically, a serving of perogi will contain enough flour (a k'zayis) so you should say the al hamichya"al hamichya" after blessing-blessing. If you ate a small piece of perogi, so you did not eat enough flour to warrent al hamichyawarrant "al hamichya" but you did eat a k'zayis of perogi, then say the after blessing of borei nefashos"borei nefashos". If you eat less than a k'zais of perogi, and haveyou eat no other foodfoods, then no after bracha-bracha is said. Even
Even if you eat enough perogi for a full meal, you would not say Bircas Ha'mazon afterward because that blessing is said only on baked goods, not boiled. (See, for example, http://berachot.org/foods/letter_s.htm for spagettispaghetti.) If
If you fried the perogi (which you did not say you were doing), the situation would become more complicated and less clear. (It might seem that berachot,.org is taking a stand on this based on the entry for fried dough. But But fried dough is really deep fried, which is considered boiling.)
As an aside, it is very difficult to learn the laws of blessings. For For reasons I do not understand, the several presentations of these laws that I have read are confusing in various details.