http://qs321.pair.com?node_id=579402


in reply to Line break interpretation

Another approach which may be suitable if it's only line-breaks you're interested in may be to use a substitution.
#!/usr/bin/perl use strict; use warnings; my $msg = 'Hello\nWorld'; print "Msg was $msg\n"; $msg =~ s/\\n/\n/g; print "Msg is $msg\n";