Usually, anything made with flour (other than bread) takes the before bracha for flour: mezonos. So, apple pie is made of flour (crust), apples, and sugar, and a usual size serving of apple pie takes the mezonos before blessing. See, for example http://berachot.org/foods/letter_a.htm for apple strudel or apple pie.  The after 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 after blessing.  If you ate a small piece of perogi, so you did not eat enough flour to warrent al hamichya but you did eat a k'zayis of perogi, then say the after blessing of borei nefashos.  If you eat less than a k'zais of perogi, and have no other food, then no after bracha is said.  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 spagetti.)  If you fried the perogi (which you did not say you were doing), the situation would become more complicated and less clear. (The site you mention, http://berachot.org/foods/letter_d.htm, holds that fried dough takes mezonos, but that is not a universal opinion.)