ç¹å¥ãªæ¡ä»¶ããªãããããeach()ã¯ä½¿ãã¹ãã§ã¯ããã¾ããã代ããã«keys()/values()ã使ãã¹ãã§ãããã®çç±ã¯2ã¤ããã¾ãã each()ã¯é ã each()ã§ããã·ã¥å ¨ä½ãã«ã¼ãããã®ã¯é ãã§ããããã¯ãkeys()/values()ããã®å é¨ã®å¤ããã®ã¾ã¾åç §ãã*1ã®ã«å¯¾ããeach()ã¯ä»£å ¥ããªãã¨ãã®å¤ã使ããªãããã§ãã ãã³ããã¼ã¯ï¼ #!perl use strict; use warnings; use Benchmark qw(cmpthese); my %hash = map { $_ => $_ } ( 1 .. 10000 ); cmpthese -1, { each_k => sub { while(my $key = each %hash) { } }, each_kv => sub { while(my($key, $value) = eac
{{#tags}}- {{label}}
{{/tags}}