Your bit of code works exactly as I would like mine to. =( I've put it into an executable and it does what I expect. However, if I gut the function in the original cgi script and put your code in, it fails. In fact, nothing is printed after the eval statement.

I have found, however, that if I substitute &lt; for < in the file and then s/\&lt;/\</g; after it is pulled out, the text will then take the form that I want. Now, though as I stated above, I find that the real failure is in the eval portion. But, I cannot pull out the reason using $@. I think that it fails, but it will not say why.

I am not using Template::Toolkit or the like because I don't know what is going to be on a particular server. I am usually writing code for people who are paying to be hosted on someone's server and I cannot always be sure what is and is not installed there. Likewise, I don't have access to SSH their sites. So, I try to keep it as "pure" as possible. Of course, as anyone will correctly point out, this means that I have to wade through my own errors before the code becomes fit for consumption.

I must be doing something incredibly stupid. But, I can't see it.


In reply to RE:RE: < Woes by rongoral
in thread < Woes by rongoral

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.