W
Wojtek Dziegielewski
How to expand escape sequences contained in a variable?
Example, if I want the input record separator ($/) to be 2 consecutive new
line characters, I can use literal string like this:
$/ = "/n/n";
However, my sequence for the input record separator is inside a variable,
like this:
my $a = '/n/n';
I need to assign the contents of $a to $/ in such a way that /n's will get
translated into newline characters. How can I have it accomplished in Perl?
Example, if I want the input record separator ($/) to be 2 consecutive new
line characters, I can use literal string like this:
$/ = "/n/n";
However, my sequence for the input record separator is inside a variable,
like this:
my $a = '/n/n';
I need to assign the contents of $a to $/ in such a way that /n's will get
translated into newline characters. How can I have it accomplished in Perl?