I am a noob at Perl, and I have a 'glitch' I just can not figure out. The code is for a mini site search, where we identify each file to be searched, one by one.

Here is a sample of some calling print statements...

if (open(THE_FILE, $prestring . "WWM.txt")){print "<center><img bor +der=0 src=/article_separator.png><br><B>WWM: Windmills and Wind Motor +s. 1910.</B></center><br>";fn1();} else {print "<center><img border=0 + src=/article_separator.png><br><b>Windmills and Wind Motors, 1910,</ +b> has no ATOCI.</b></center><br>"}; if (open(THE_FILE, $prestring . "ycmi.htm")){print "<center><img bo +rder=0 src=/article_separator.png><br><B>YCMI: You Can Make It. 1929- +1931.</b></center><br>";fn1();} else {print "<center>YCMI file not fo +und.</center><br>"}; if (open(THE_FILE, $prestring . "youngs.htm")) {print "<center><img + border=0 src=/article_separator.png><br><B>YOUNGS: Youngs Demonstrat +ive Translation of Scientific Secrets. 1861.</b></center><br>";fn1(); +} else {print "<center>Youngs.htm Missing.</center><br>"};

And the function they call:

sub fn1 { while (<THE_FILE>) { $record = $_; $_ = uc($_); if (/$ucsearch/) { print "$record"; $count++; } } close (THE_FILE); }

Now, about bingo 200, we lose the html from the calling print lines in the output, but not the text. Plus the process completes. It is not the server, as it does this both under Linux (web server) and XP XAMPP. It is not data slipping in and glitching, as the calling lines were rearranged, and still faulted around bingo 200. I think it is some setting, or buffer, but have no clue...

Live example can be seen at http://www.librum.us/1-card.htm

For a good run, use 'grape'. For a 200+ bingo type 'apple'.

Help?

Sarah, of the Librum


In reply to 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.