#!/usr/bin/perl
use warnings;
my %hash=("no1"=>1, 
        "no2"=>2,
      );
print %hash; #Prints no11no22
print "%hash"; #Prints %hash为什么Perl不支持双引号内插哈希?它支持标量($),数组(@)的插值,那么为什么不支持哈希值(%)呢?
发布于 2011-07-18 18:12:17
引用Nathan Torkington的话说:“最大的问题是%在带有printf的双引号字符串中大量使用。”更多信息请访问here。
https://stackoverflow.com/questions/6731291
复制相似问题