The BRISKER RAV (Hilchos Chanukah 3) cites RABEINU YERUCHAM who explains that "Perek" refers to any set time during the year at which there is a special enactment to recite Hallel (the three festivals, and Chanukah). "Tzarah," on the other hand, refers to the actual moment of salvation at which the Jewish people should sing Hallel to thank Hashem for their deliverance. The source for the recitation of Hallel at the moment of salvation can be found in the BEHAG. He writes that part of the decree of the Nevi'im was for the Jews to say Hallel spontaneously whenever they, as a group, are saved from imminent peril.
RABEINU YONAH in Berachos says that when the Jewish people want to sing spontaneous praises to Hashem in response to a miraculous delivery from danger, they need not recite the entire Hallel. Even when they have said a blessing over Hallel, they are permitted to say as many or as few passages as they wish. They may even interrupt in the middle. In contrast, the Hallel of a "Perek" must be recited in the order of its paragraphs, and a blessing may be said only when the entire Hallel is recited.
...The Brisker Rav explains that these differences are based on a more fundamental disparity in the underlying essence of the two types of Hallel. The "Perek" Hallel is recited as an obligation of "Keri'ah"--to read the Hallel. Its goal is to arouse one's love for Hashem through the remembrance of a miracle which He performed at a certain time in the past. In contrast, the Hallel of "Tzarah" is said as a form of praise to Hashem, or "Shirah." It is an expression of the immense love for Hashem that one feels at a time of miraculous salvation.
In other words, they are reading the gemara as follows:
{:he}
>הַלֵּל זֶה מִי אֲמָרוֹ? נְבִיאִים שֶׁבֵּינֵיהֶן תִּקְּנוּ לָהֶן לְיִשְׂרָאֵל שֶׁיְּהוּ אוֹמְרִין אוֹתוֹ עַל כׇּל פֶּרֶק וּפֶרֶק; וְעַל כׇּל צָרָה וְצָרָה (שֶׁלֹּא תָּבֹא עֲלֵיהֶן!) וְלִכְשֶׁנִּגְאָלִין, אוֹמְרִים אוֹתוֹ עַל גְּאוּלָּתָן.
--פסחים קיז,א
The phrase שֶׁלֹּא תָּבֹא עֲלֵיהֶן does not describe when to say הלל, but is an aside. The two types of הלל are עַל כׇּל פֶּרֶק וּפֶרֶק (in memory of a miraculous salvation; the קריאה of הלל), and וְעַל כׇּל צָרָה וְצָרָה וְלִכְשֶׁנִּגְאָלִין (after the experience of a miraculous salvation; the שירה of הלל). With that, let's look at the first perek. We all know it well:
{:he}
>