Perl字符串标量
以下示例演示了各种类型的字符串标量的用法。注意单引号字符串和双引号字符串之间的区别-
示例
#!/usr/bin/perl $var = "这是字符串标量!"; $quote = 'I m inside single quote - $var'; $double = "This is inside single quote - $var"; $escape = "This example of escape -\tHello, World!"; print "var = $var\n"; print "quote = $quote\n"; print "double = $double\n"; print "escape = $escape\n";
输出结果
这将产生以下结果-
var = 这是字符串标量! quote = I m inside single quote - $var double = This is inside single quote - 这是字符串标量! escape = This example of escape - Hello, World
热门推荐
10 财运虎年祝福语简短语
11 单亲爸爸春节祝福语简短
12 狗狗上厕所训练
13 植物种植祝福语简短
14 翻译考试祝福语朋友简短
15 个人周年庆简短祝福语
16 狗狗怎么训练
17 分别祝福语简短搞笑英文
18 生日广州男生祝福语简短