【发布时间】:2014-03-06 21:17:43
【问题描述】:
我还没有掌握数组和散列、散列数组、散列散列等之间的区别,所以我不知道下面的代码定义了什么。有人能告诉我它是什么吗?
my $col_props = [
{ min_w => 50, # Minimum column width.
max_w => 50, # Maximum column width.
justify => 'left', # One of left|center|right ,
font => $pdf->corefont( "Arial", -encoding => "latin1" ),
},
{ min_w => 110, # Minimum column width.
max_w => 110, # Maximum column width.
justify => 'left', # One of left|center|right ,
font => $pdf->corefont( "Arial", -encoding => "latin1" ),
},
{ min_w => 110, # Minimum column width.
max_w => 110, # Maximum column width.
justify => 'left', # One of left|center|right ,
font => $pdf->corefont( "Arial", -encoding => "latin1" ),
},
];
但是,我真正的问题是,鉴于上面的代码,我如何动态填充 $col_props?
【问题讨论】: