Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333] : superdoc . print w/replies, xml ) Need Help??
actually i hadn't thought of the $10.45 case, but that's a key point. The upper/lower casing I picked was pretty much just an arbitrary definition of this quick & dirty template system. My rationale was all upper for the template vars so that they stand out more in the template. And all lowercase for the keys since variable/key names are typically lowercase. Also, lc'ing it makes it tolerant of typos like $FIRSt_NAME in the template.

As for what to do with unknown vars, i figured that leaving '$FOO' in there was better to make it obvious that it didn't match, whereas doing '' might not be noticed..

But both ways are up to the template authoer on how they prefer it to work..

In reply to Re^2: inserting HTML file in a PERL script by davidrw
in thread inserting HTML file in a PERL script by thetallblondguy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.