我還沒有掌握數組和哈希,哈希數組,散列哈希等差異,所以我不知道下面的代碼定義了什麼。有人會好心讓我知道這是什麼嗎?動態填充嵌套的Perl哈希和數組
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
動態?
http://perldoc.perl.org/perldsc.html#ARRAYS-OF-HASHES –
從什麼填充它? – ikegami