I reduced your code down to this test case: perl -e '$_=" "; formline q{^<<<~~}, $_; length $^A or die' and a bisect reported that "9b4bdfd4 is the first bad commit". This is a commit that fixes several bugs in formats; it was first released as part of Perl v5.20.0 9 years ago.

If you read the documentation, note that a double tilde means "the line will be repeated until all the fields on the line are exhausted, i.e. undefined", however, a single tilde "anywhere in the line" means to suppress "lines where all fields are blank". Although I think the documentation could be a lot more clear on this (Update: patch applied), a double tilde implies the single tilde, as is confirmed by the relevant code in Perl 5.0.0 and today.

Anyway, the following provides your expected output both on older and recent Perl versions (tested on 5.14 to 5.36):

format REP = ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $rep_line ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ~~ $rep_line .

In reply to Re: perl 5.32 format question by haukex
in thread perl 5.32 format question by hotpelmen

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.