You might not have noticed, but the print command can take a list of things to print, which means that join() is really not required. The syntax error is that after your first string where you establish the font, you don't use the period to concatenate, or a comma to make a proper list.
foreach (0..2) { print '<font face="courier"><p>', substr($strings[$_], $x, $line_length), '</p></font>', $/; }
I moved the for-loop into a more obvious location. Before you were losing it in the print statement. I've also take then liberty of opening your <FONT> tag properly, as well as using single quotes to avoid having to escape the quotation marks in your HTML.

As another note, print sends to STDOUT by default, so there's no real need to specify that.

In reply to Re: Wrapping Strings by tadman
in thread wrapping a pair of lines; what if different lengths? by Anonymous Monk

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.