1 #!/usr/bin/perl
2 use strict;
3 my $strq=q{\n\nthis is q test};
4 my $strqq=qq,\n\nthis is qq test\n,;
5 my @qw=qw /this is a qw test \n/;
6 my @qq=qq(this is qq test \n);
7 my $qr=/test/;
8 my $qx=qx(date);
9 print $strq;
10 print $strqq;
11 print "@qw";
12 print "\n";
13 print "@qq";
14 print "\nthis is qr test $qr\n" if($strq=~$qr);
15 print $qx;
输出结果:
D:\>perl string.pl
\n\nthis is q test
this is qq test
this is a qw test \n
this is qq test
this is qr test
The current date is: 2013/06/28 周五