{}ã®åã«ãã©ã¹ãä»ãã¦ã+{}ã¨ããªã£ã¦ãã®ãããè¦ããã©ããã£ã¨ããã®æå³ãåãã£ãã®ã§ã¡ã¢ã ãã®ã«ãã³ã¯ããã·ã¥ä»¥å¤ã«ã使ãããããããããã¯ããã·ã¥ãªãã¡ã¬ã³ã¹ã§ãããã¨æ示ããããã®ãã®ã use strict; use warnings; use Data::Dumper; local $\ = "\n"; sub p { print Dumper shift; } sub hashref_ng { { @_ } } sub hashref_ok { +{ @_ } } my $ng = hashref_ng(1,2,3,4); my $ok = hashref_ok(1,2,3,4); p $ng; p $ok; å®è¡çµæ % perl hashref.pl $VAR1 = 4; $VAR1 = { '1' => 2, '3' => 4 }; ãããªå¸¸èãç¥ããã«ããã¾ãã
{{#tags}}- {{label}}
{{/tags}}