I'm using a CGI script called render.pl to build pages on a site dynamically, but I'm running into a problem. On some pages, my output stops after the first 16,384 characters are transmitted.

render.pl is designed to pull in chunks of code from other files using require and run certain functions in them. The full script is over 100 lines long, but the meat of it follows:

$query=new CGI; $re=$query->path_info; $re =~ s#^/##g; $re =~ s#/$##g; $re='front' unless $re; eval { require "re/$re.pl"; #include render engine or die }; if($@) { die "rendering error: bad rendering engine\n"; } $_=`cat tem/main.htt`; s#\$\{title\}# '<! title >'.CodeNews::RE::title($query) +.'<! /title >' #ieg; s#\$\{left\}# '<! left >'.CodeNews::RE::renderLeft($query) +.'<! /left >' #ieg; s#\$\{content\}# '<!content>'.CodeNews::RE::renderContent($query).' +<!/content>' #ieg;

I'm only getting this in one chunk of code, the code for my Submit page. This code generates the site's largest page.

The cutoff doesn't seem to occur if STDOUT is connected to a tty. If I run the script via telnet, it comes out fine--unless I redirect the output to a file, in which case it's cut off. Weird.

This may well be a problem in FreeBSD or this system's configuration, but I just have no idea what it is. Any thoughts?

perl -v: This is perl, version 5.005_03 built for i386-freebsd

=cut
--Brent Dax

@HPAJ=split("", "rekcaH lreP rentonA tsuJ"); print reverse @HPAJ; #sucky but who cares?

In reply to CGI cut off after about 16000 characters by BrentDax

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.