Hi All, I have a small problem in reading from a file. I have a template file in which one of the line looks like this. Sam is riding a __VEHICLE__ ... I will be replacing __VEHICLE__ with a string value which i normally +get it from databse. Problem is, i will be using this variable '__VEH +ICLE__' at many places in my file. I need the value to be printed in +caps in some places and small letters in some places. I tried to print the value by placing \U....\E character in file itsel +f. But while printing, these escape characters are not recognized. Line in file :Sam is riding a \U__VEHICLE__\E ... replacing __VEHICLE__ with 'car' during reading Output Looks like this. Sam is riding a \Ucar\E ... Is there any way to recognize these characters from file and get the r +esult as expected.

In reply to Reading escape characters from file by cbharath

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.