cbharath has asked for the wisdom of the Perl Monks concerning the following question:
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reading escape characters from file
by wfsp (Abbot) on Oct 04, 2008 at 13:06 UTC | |
|
Re: Reading escape characters from file
by Anonymous Monk on Oct 04, 2008 at 13:02 UTC | |
|
Re: Reading escape characters from file
by aufflick (Deacon) on Oct 05, 2008 at 11:45 UTC |