in reply to Can't get \n or other character/translation escapes to interpolate if originally read from a data file

The __DATA__ (a.k.a. __END__) block doesn't do interpolation. (Update: Nor \u \U \l \L \Q \E \t \n \r \etc similarly.)

Also remember that by default, you're reading the lines using \n (newline) as a line delimiter, so if you should succeed in embedding \n into a line that you write to a file, you'll end up with two lines!


Give a man a fish:  <%-{-{-{-<

  • Comment on Re: Can't get \n or other character/translation escapes to interpolate if originally read from a data file
  • Select or Download Code