How you best solve this depends on how many escape sequences you want to support. For example, in this case a simple s/\\n/\n/g; s/\\r/\r/g; might be enough, but there are also modules such as String::Interpolate to give you the full power of Perl's interpolation (which may be too much power for the users of the configuration file). I would stay away from eval unless you are absolutely certain that you can always trust your input.
In reply to Re: Record separator in variable
by haukex
in thread Record separator in variable
by tecbuilt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |