some string quoting exercises

This commit is contained in:
Dan Buch 2011-01-05 21:32:20 -05:00
parent f39fc4dc24
commit 760ded693b

34
cli/quoting.pl Normal file
View File

@ -0,0 +1,34 @@
#!/usr/bin/env perl
use strict;
use warnings;
print qq{I said "They're the most delicious fruits!".\n};
print q/I said "They're the most delicious fruits!"./ . "\n";
print <<OUTPUT
I said "They're the most delicious fruits!".
OUTPUT
;
my $one = 'mangoes';
print "I like $one.\n";
print 'I like $one.' . "\n";
print qq/I love $one.\n/;
print q#I love $one.# . "\n";
print <<OUT
I <3 $one
OUT
;
print <<'OUT'
I <3 $one
OUT
;
1;
__END__