I took another look at your page and checked the source again.

Where a list of results occurs, e.g search for apple and look at the data found in "FCOA: Farmers Cyclopedia of Agriculture. 1911"; there is malformed HTML

<center><img border=0 src=/article_separator.png><br><B>FCOA: Farmers +Cyclopedia of Agriculture. 1911.</b></center><br><center><TR><td>APPL +E&#65533;Root-grafting, root vs. top-grafting, location and soil, pla +nting the trees, cultivation and cover crops, manuring, pruning, harv +esting and storage, utilization of waste apples, varieties, general s +cheme for spraying apple trees, enemies</td><td> 216</td></tr> <br><center><TR><td>PINEAPPLE&#65533;Locations, propagation, fertilize +rs, growing under sheds, varieties, enemies</td><td> 287</td></tr> <br><center>Apples, 216<Br> <br><center>Apples, Aphis, 228<Br> <br><center>Apples, Bitter Rot, 223<Br> <br><center>Apples, Borers, 226, 270<Br> <br><center>Apples, Brown Rot, 224, 275<Br> <br><center>Apples, Bud Moth, 227<Br>Rot, 223<Br>

with some table markup being thrown in and no closing center tag on the record data returned from the file.

Your initial file title is there

<center><img border=0 src=/article_separator.png><br><B>FCOA: Farmers +Cyclopedia of Agriculture. 1911.</b></center><br>

but I would assume the sudden appearance of table markup followed by unterminated center tags isn't helping your output. In this case I would say the error is probably in your original fn1 function where you print the record out and the table markup is in the data you pick up. Neither of these is a Perl problem although they can be solved with Perl

If I haven't identified your problem, would you please post a snippet of HTML that shows the problem?


In reply to Re^3: losing html in print calling function. by LesleyB
in thread losing html in print calling function. by Librum

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.