字符串列表简写qw
时间:2006-12-30 来源:hunter_cao
#############################################################
# qw 表示“quoted words”或者“quoted by whitespace”.
# qw中包含的字符串,当作单引号字符串处理.转义字符,空格等也就失去了意思.
# 分界符不可同时用,有开分界符就有一个对应的闭分界符.
#############################################################
#!/usr/bin/perl -w
#其中分界符包含在如下事例中:
print qw(one two three),"\n";
print qw!one two three!,"\n";
print qw#one two three#,"\n";
print qw{one two three},"\n";
print qw[one two three],"\n";
print qw<one two three>,"\n";
# qw 表示“quoted words”或者“quoted by whitespace”.
# qw中包含的字符串,当作单引号字符串处理.转义字符,空格等也就失去了意思.
# 分界符不可同时用,有开分界符就有一个对应的闭分界符.
#############################################################
#!/usr/bin/perl -w
#其中分界符包含在如下事例中:
print qw(one two three),"\n";
print qw!one two three!,"\n";
print qw#one two three#,"\n";
print qw{one two three},"\n";
print qw[one two three],"\n";
print qw<one two three>,"\n";
相关阅读 更多 +