Perlã®ææ°ãã¼ã¸ã§ã³ 5.24ãªãªã¼ã¹ - ãµãã«ã¼ãã³ã¨æ°å¤è¨ç®ã®é«éåãUnicode 8.0ã®ãµãã¼ããææ³æ©è½å¼·å
Perl
›
ãã¼ã¸ã§ã³æ å ±
›
here
ãPerlã®ææ°ãã¼ã¸ã§ã³5.24ããªãªã¼ã¹ããã¾ãããä»åã®ãªãªã¼ã¹ã§ã¯ãPerlã®ãµãã«ã¼ãã³ã¨æ°å¤è¨ç®ã®é«éããªããã¦ãã¾ããã¾ããæ©è½é¢ã§ã¯ãUnicode 8.0ã®ãµãã¼ãããªããã¾ãããææ³çãªå¼·åã¨ãã¦ãåæ¹ããªãã¡ã¬ã³ã¹ã®å®é¨çãªã¹ãã¼ã¿ã¹ãã¯ãããã¦ãã¾ãããã®ä»ãç´°ããªãã°ãã£ãã¯ã¹ããªããã¾ããã
ãPerl 5.22ã«å¼ãç¶ãPerl 5.24ã§ã¯ãPerlã®å é¨ã³ã¼ãã®æ¹åããªããã¦ãã¾ããããã©ã¼ãã³ã¹ã®æ¹åã¨ãã大ããªã¡ãªãããããã¾ãããããã¤ãã®å¯ä½ç¨ãããã¾ãã®ã§ãåããã¦ã解説ãã¾ãã
ãèªåãæè¡çã«ä¸æ £ãã§ãå®å®çãªPerlãæããªããä»ã®ã¨ããPerl 5.20ãããããã§ããæè¡çã«å¼·ããããã©ã¼ãã³ã¹ã®æ¹åãæ°ããæ©è½ã«ãã£ã¬ã³ã¸ãããæ¹ã¯ãPerl 5.24ã«ãã©ã¤ãã¦ã¿ã¦ãã ããã
ã以ä¸ã§ãPerl 5.24ã®å¤æ´ç¹ã解説ãã¾ãã
ããã©ã¼ãã³ã¹ã®æ¹å
ãPerl 5.24ã®æ大ã®å¤æ´ç¹ã¯ãããã©ã¼ãã³ã¹ã®æ¹åã§ãã
ãµãã«ã¼ãã³å¼ã³åºãã®é«éå
ãã¹ã³ã¼ãçæã¨çµäºã®ãªã¼ãã¼ããããã§ããéãæ¸ãããã®ã§ãã«ã¼ãã¨ãããã¯ãéããªãã¾ããããã¨ãã°ã以ä¸ã®ç©ºã®ãµãã«ã¼ãã³ã¯ãä»ã¾ã§ã®ç´ä¸åã®éãã§å®è¡ã§ãã¾ãã
sub f{} f();
ã5.24ã®å¤æ´ã§ãæãããããã®ã¯ããã§ããããPerlã®åé¡ç¹ã®ã²ã¨ã¤ã«ãµãã«ã¼ãã³å¼ã³åºããé ãã¨ãããã®ãããã¾ããããããã«ãã£ã¦ãåé¡ã®ã²ã¨ã¤ãæ¹åããã¦ãã¾ãã
大æåãå°æåãæ±ãé¢æ°ãæ£è¦è¡¨ç¾ã®ããã©ã¼ãã³ã¹æ¹å
ãä¸å½èªã®ããã«ã大æåå°æåã®åºå¥ããªãè¨èªãããã¾ãããã®ãããªè¨èªã«ã¤ãã¦ã¯ããã¸ãã¯ãã¹ããããããã¨ã«ãã£ã¦ãucfirsté¢æ°ããqr//iãã®ããã©ã¼ãã³ã¹ãä¸æãã¾ããã
substrã®é«éå
ãmemchrããµãã¼ãããã¦ãããã©ãããã©ã¼ã ã«ããã¦substrãé«éåããã¾ããã以ä¸ã®å¦çãã7åç¨åº¦éããªã£ã¦ãã¾ãã
$s = "a" x 1000 . "wxyz"; $s =~ /wxyz/ for 1..30000
足ãç®ã»å¼ãç®ã»æãç®ã®é«éå
ãPerl 5.8.0ã«ããã¦ã64bitæ´æ°ããµãã¼ãããããã«ãæ°å¤æ¼ç®ãé ããªã£ã¦ãã¾ãããããã®é ããã¸ãã¯ãæ¹åãã¾ãããPerlã¯ãæ°å¤æ¼ç®ãé ãã¨ãããã¾ãããå°ãæ¹åããã¾ããã
ã¤ã³ã¯ãªã¡ã³ãã»ãã¯ãªã¡ã³ãã®æ§è½ã®æ¹å
ãPerlã®ã¤ã³ã¯ãªã¡ã³ãã»ãã¯ãªã¡ã³ãã®æ§è½ãæ¹åããã¾ãããã«ã¼ãå¦çãªã©ããå°ãéããªãã¾ãã
æ©è½é¢ã®å¼·å
Unicode 8.0ã®ãµãã¼ã
ãUnicode 8.0ããµãã¼ãããã¾ãããPerlã¯Unicodeãµãã¼ãã®å¯¾å¿ãéãã§ã
æ°ããæ£è¦è¡¨ç¾ \b{lb}
ãæ¹è¡ã®åºåãã表ç¾ããæ°ããæ£è¦è¡¨ç¾ã\b{lb}ãã追å ããã¾ããã
åæ¹ããªãã¡ã¬ã³ã¹ã®å®é¨çãªã¹ãã¼ã¿ã¹ãã¨ãã¾ãã
ãPerl 5.24ã§ã¯ãåæ¹ããªãã¡ã¬ã³ã¹ããæåãããæå¹ã«ãªãã¾ããããã®ãããã§ããªãã¡ã¬ã³ã¹ããã®ãé åã¹ã©ã¤ã¹ãããã·ã¥ã¹ã©ã¤ã¹ãé¨åããã·ã¥åå¾ãé¨åé ååå¾ã®å¦çããè¨è¿°ãããããªã£ã¦ãã¾ãã
# åæ¹ããªãã¡ã¬ã³ã¹ my $nums_ref = [1, 2, 3]; my @nums = $nums_ref->@*; # (1, 2, 3); # åæ¹ããªãã¡ã¬ã³ã¹ã使ç¨ããé åã¹ã©ã¤ã¹ my @nums_part = $nums_ref->@[0, 2]; # (1, 3) my $names_h_ref = { ken => 1, taro => 2, kimoto => 3 }; # åæ¹ããªãã¡ã¬ã³ã¹ã使ç¨ããããã·ã¥ã¹ã©ã¤ã¹ my @names_part = $names_h_ref->@{'ken', 'kimoto'}; # (1, 3) # åæ¹ããªãã¡ã¬ã³ã¹ã使ç¨ããé¨åããã·ã¥åå¾ my %names_h_part = $names_h_ref->%{'ken', 'kimoto'}; # (ken => 1, kimoto => 3)
äºææ§ã®ãªãå¤æ´
ãä»åã®ãªãªã¼ã¹ã§ã¯ãããã¤ãã®å®é¨çãªæ©è½ããåé¤ããã¦ãã¾ãã
èªåããªãã¡ã¬ã³ã¹ã®åé¤
ãå»æ¢è¦åãåºããã¦ãããå®é¨çãªèªåããªãã¡ã¬ã³ã¹ãåé¤ããã¾ããããã¨ãã°ã以ä¸ã®å¦çãåããªããªãã¾ããpush, pop, shift, unshift, splice, keys, values, eachã«ããªãã¡ã¬ã³ã¹ã渡ããã¨ã¯ã§ãã¾ããã
ã¬ãã·ã«ã«ãª$_ãå»æ¢ããã¾ããã
ãC
ãã¹ãããã宣è¨ã許å¯ãããªããªã£ã
ããã¹ãããã宣è¨ã¯è¨±å¯ãããªããªãã¾ããã以ä¸ã®è¨è¿°ã¯ã³ã³ãã¤ã«ã¨ã©ã¼ã«ãªãã¾ãã
my ($x, my($y)); our (my $x);
chdir('')ã¯ããã¼ã ãã£ã¬ã¯ãã«ç§»åã§ããªããªãã¾ãã
ãchdir('')ã¯ããã¼ã ãã£ã¬ã¯ããªã«ç§»åã§ããªããªãã¾ãããchdir()ã使ã£ã¦ãã ããã
ç¥ããã¦ããåé¡
ãPerl 5.24ã§ã¯ãå é¨çãªæ¹åã®ããã«ãä¿è¨¼ãããªãå®è£ ãå©ç¨ãã¦ãããããã¤ãã®ã¢ã¸ã¥ã¼ã«ããåããªããªã£ã¦ãã¾ããããã¯ãç¾å¨Perlã®ã³ã¢ãã¼ã ã§ãè°è«ããã¦ããã®ã§ãçµéãè¦å®ãã¾ãããã
- Algorithm::Permute
- Coro
- Data::Alias
- RPerl
- Scope::Upper
- TryCatch
- lexical::underscore
ãæè¿ã®Perlã¯ãå é¨æ¹åãå¤ãè¡ããã¦ããã®ã§ãå é¨APIã«ä¾åãããææ³å¤åå½¢ã®ã¢ã¸ã¥ã¼ã«ã«ä¾åãããã¨ã¯ããªã¹ã¯ãä¼´ã£ã¦ãã¾ãã
æè¦
ãPerlã®ããã©ã¼ãã³ã¹ãä¸ãããã¨ã¯ããããå¤æ´ã§ãããã®æ¹åæ§ã¯ãééã£ã¦ã¯ããªãã¨æãã¾ãããã®ããã«ãå é¨æ¹åãå¿ è¦ã§ããããã®ããã«ãããã¤ãã®ææ³å¤åå½¢ã®ã¢ã¸ã¥ã¼ã«ããå£ããã¨ããç¶æ³ã«ãªã£ã¦ãã¾ãã
ãç¹ã«ãè°è«ã®çã¨ãã¦ã¯ãCoroã®è©±é¡ã大ããããã§ããå°æ¥çã«ã¯ãã³ã«ã¼ãã³ãPerlã³ã¢ã®ã»ãã§ããµãã¼ãããã®ãããã¨æãã¾ãããææ³å¤åå½¢ã®ã¢ã¸ã¥ã¼ã«ããå¤é¨ã®ã¢ã¸ã¥ã¼ã«ã¨ãã¦å®è£ ãããã¨ã常ã«å£ããå¯è½æ§ãã§ã¦ããããã§ãã
Perl
›
ãã¼ã¸ã§ã³æ å ±
›
here