Perlã®HTML::Templateã¢ã¸ã¥ã¼ã«ã£ã¦ãhashrefã®arrayrefããæ±ããªãã®ã§ããããã以ä¸ã«ä¾ã示ãã¾ãããµã³ãã«1ã¯ããã®ã ããã©ããµã³ãã«2ã¯ã©ããã³ãã¬ã¼ããæ¸ãã°ããããã¨ãã話é¡ã§ãããµã³ãã«2ã¯hashrefã®hashrefã§ãããããã©ãªããæ
å ±ãããã°ãæ示ãã ããã ãµã³ãã«1: ï¼ããã¯OKï¼ use strict; use warnings; use HTML::Template; my $data1 = [ { NAME => 'Alice', AGE => 23 }, { NAME => 'Bobby', AGE => 18 }, { NAME => 'Chris', AGE => 17 }, ]; my $t = HTML::Template->new( scalarref => \<<'EOD', <TMPL_LOOP NAME=US
{{#tags}}- {{label}}
{{/tags}}