in reply to Record separator in variable
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Record separator in variable
by tecbuilt (Initiate) on Jun 06, 2019 at 17:53 UTC | |
by stevieb (Canon) on Jun 06, 2019 at 18:20 UTC | |
by BillKSmith (Monsignor) on Jun 07, 2019 at 03:09 UTC | |
|
Re^2: Record separator in variable
by daxim (Curate) on Jun 07, 2019 at 08:43 UTC |