[lug] Perl question: how to print embedded metacharacters

Walter Pienciak wpiencia at thunderdome.ieee.org
Wed Nov 25 10:06:50 MST 2009



Not sure I'm understanding the context, but

#!/usr/bin/perl

use strict;

my $kw = 'abc\ndef';
print "[$kw]";

print "\n-------\n";

my $kx = "abc\ndef";
print "[$kx]";


I've added brackets for clarity.

Walter



More information about the LUG mailing list