Perl ⺠ãã使ãé¢æ°ã»ã¢ã¸ã¥ã¼ã« ãã使ç¨ããé¢æ°ã»æ¨æºã¢ã¸ã¥ã¼ã«ã®ä¸è¦§ã§ãããããã®é¢æ°ãè¦ãã¦ããã°ãPerlããã便å©ãªãã®ã«ãããã¨ãã§ãã¾ãã詳細ãªè§£èª¬ã¯é¿ããç°¡åãªãµã³ãã«ãç´¹ä»ãã¦ãã¾ããæ»ãå¤ã®ãããã®ã«ã¤ãã¦ã¯$retã¨ããè¨å·ã§è¡¨ãã¦ãã¾ãã ã¾ãããã使ç¨ããç¹æ®å¤æ°ãæ¨æºã¢ã¸ã¥ã¼ã«ã«ã¤ãã¦ãã解説ãã¦ãã¾ããåé ç®ãããé¢æ°ã®è©³ç´°ã«ããªã³ã¯ãã¦ãã¾ãã®ã§ã便å©ã«ãå©ç¨ãã ããã æ°å¦é¢æ° æååæä½ é åæä½ ããã·ã¥æä½ ãã¡ã¤ã«å ¥åºå ãã¡ã¤ã«ã»ãã£ã¬ã¯ããªæä½ æå»ã»æé ãã®ä»ã®éè¦ãªé¢æ° é¢æ°ã¨ã¢ã¸ã¥ã¼ã«ã®ããã¥ã¡ã³ãã®èª¿ã¹æ¹ ãã使ç¨ããç¹æ®å¤æ° ãã使ç¨ããæ¨æºã¢ã¸ã¥ã¼ã« æ°å¦é¢æ° abs 絶対å¤ãæ±ããã«ã¯absé¢æ°ã使ç¨ãã¾ãã $ret = abs $num; abs(-3)ã¯3ã«ãªãã¾ãã sqrt æ£ã®å¹³æ¹æ ¹ãæ±ããã«ã¯ãsqrté¢æ°ã
Emacs22ããæ¨æºæ·»ä»ããã¦ããflymakeãè¶ ä¾¿å©ã§ããflymakeã¯ãåçã«ã·ã³ã¿ãã¯ã¹ãã§ãã¯ãè¡ã£ã¦ãããelispã§ãtypoçã«ãããã¹ããããã§ããªãæ¸ããã¨åãåãã以ä¸ã®è¨å®ã«ã¯ãset-perl5lib.elãå¿ è¦ãªã®ã§ããããããload-pathã®éã£ãå ´æã«ã¤ã³ã¹ãã¼ã«ãã¦ããå¿ è¦ãããã¾ãã http://svn.coderepos.org/share/lang/elisp/set-perl5lib/set-perl5lib.el 以ä¸ãè¨å®ã ;; flymake (Emacs22ããæ¨æºæ·»ä»ããã¦ãã) (require 'flymake) ;; set-perl5lib ;; éããã¹ã¯ãªããã®ãã¹ã«å¿ãã¦ã@INCã«libã追å ãã¦ããã ;; 以ä¸ãããã¦ã³ãã¼ãããå¿ è¦ãã ;; http://svn.coderepos.org/share/
ãªãã¸ã§ã¯ãæåPerlã®ããã¿ã解説ãã¾ãã Perlã¢ã¸ã¥ã¼ã«ã®ä½ãæ¹ã¨ä½¿ç¨æ³ã«ã¤ãã¦ã解説ãã¾ãã [1] ããã±ã¼ã¸åå空éãPerlã§ã¯ããã±ã¼ã¸ã¨è¨ãã¾ãã ããã©ã¼ã«ãã®ããã±ã¼ã¸ã¯ main ããã±ã¼ã¸ã§ãã ãã ããã¡ã¤ã«ã®ãªãã«ããã±ã¼ã¸å®£è¨ï¼package ...ï¼ã®è¡ãããã¨ããã以éã«æ¸ããããã°ãã¼ãã«ãå¤æ°ï¼our å¤æ°ï¼ããµãã«ã¼ãã³ã¯ãããã§å®£è¨ãããããã±ã¼ã¸ã®ãã®ã«ãªãã¾ãã package Foo; our $name = "I am Foo!"; # $name ã¯ããã±ã¼ã¸ Foo ã«å ¥ãã # our ã¯ä»ããªãã¦ãããï¼ï¼ï¼ãããã±ã¼ã¸ã®åã¶ç¯å²ï¼ã¹ã³ã¼ãï¼ã¯ã¤ãã«åãå¥ã®ããã±ã¼ã¸å®£è¨ãæ¥ãã¾ã§ãã£ã¨ç¶ãã¾ãã ä½ãããã±ã¼ã¸å®£è¨ãããã㯠{...} ã®ãªãã§çºãããå ´åã¯ããã®ãããã¯ãéããã¨ããã§ããã±ã¼ã¸ã®ã¹ã³ã¼ããæ¶ãã¾ãã p
id:tomi-ru ããã [http://e8y.net/mag/015-encode/:title] ã¨ããã¨ã¦ããã©ã¯ãã£ã«ã«ãª [http://search.cpan.org/perldoc?Encode:title=Encode] å ¥éããæ¸ãã«ãªã£ãã®ã§ï¼ããããéãåãå£ã§æ¸ãã¦ã¿ãããªãã¾ããã ãã¡ããã®åºç¤ï¼èªã¿é£ã°ãå¯ï¼ æåã»ãã, ãã£ã©ã¯ã¿ã»ãã, æåéå, æåéå - Wikipedia ã¨ã³ã³ã¼ãã£ã³ã°, 符å·åæ¹å¼, æå符å·åæ¹å¼ - Wikipedia ãã®2ã¤ã¯ç°ãªãã¾ããã¨ãã«ç¥ããªãã¦ãä¸è¨ã®ææ¸ãèªããã¨ã¯ã§ãã¾ããï¼ç解ãã¦ããã¨ããã«ãªãã¾ããããããç¥ããã人ã¯èªç¿ãã¦ãã ããã æåã»ããã®ä¾ Unicode JIS X 0208 ã²ãããªã¨ãã«ã¿ã«ãã¨ãæ¼¢åã¨ã ASCII æå ã¨ã³ã³ã¼ãã£ã³ã°ã®ä¾ UTF-8 ISO-202
質åã®ä¸ã¤ã²ã¨ã¤ã«çèãã¦çæ¯ã«çãã¦ãããæ 度ãæ·±ã¿ã¨å«èã®ããè¨èãå対é¢ã®äººéã«å¯¾ããåªããæ¥ãæ¹â¦â¦ããã¦ãè¿çã«çª®ããã¨é£ã®å¥¥ããã«ãã©ãã ã£ãï¼ãã¨å¼ã³ããã夫婦仲ã®ãããç§ã¯ã©ãªã¼ã»ã¦ã©ã¼ã«ããã®å¤§ãã¡ã³ã«ãªãã¾ããããã¡ããã奥ããã®ã°ããªã¢ããã®ãã¡ã³ã«ãã
ç¥çµè³ªï¼Aåï¼ãªPerlããã«ã¼ãããã ãã¿ã§ãããå®è©±ã§ãã use Module; 宣è¨ãæ¸ãæãå ¨é¨ABCé ã«ããªãã¨ã¤ã©ã¤ã©ãããs///ã¨ããs{}{}ã£ã¦æ¸ãã¨ã¨ã¹ã±ã¼ããããªãã®ã«ãs/\\\/\\\/\\\\/g s/\\\/\\\//\\\\/gã¨ãè¦ãã¨ã¤ã©ã¤ã©ãããï¼è¿½è¨ï¼ãªããä¸åæãã¦ãï¼qw// ãqw()ã¨æ¸ãç´ããã«ã¯ããããªããfor(my $i = 0; $i < 10; $i++) ã¨ããè¦ã㨠for my $i (0..9)ã«æ¸ãç´ããã«ã¯ããããªãä»äººããããã£ããã¡ã¤ã«ãéããåã¯ã¨ãããã perl -i -pe 's/\r\n/\n/g'if ( ... ) elsif (...) elsif (... ) else ... ã¿ãããªã®ãè¦ãã¨ã¨ãããããã£ã¹ããããã¼ãã«ãæ¸ããããªãif ($foo eq 'XXX' || $foo
2006å¹´åé ãããPlaggerãã¨ããæè¡ããä¸é¨ã§è©±é¡ã«ãªãã¾ãããã¾ã ã¾ã ç¥å度ãä½ããPlaggerãã§ããã便å©ã§ã«ã¹ã¿ãã¤ãºæ§ãé«ããã®ãªã®ã§ã2007å¹´ã§ã¯ççºçã«æµè¡ããããããã¾ãããè±å¯ãªãã©ã°ã¤ã³ãèªå¨ã«çµã¿åããã欲ããæ å ±ãåéããå å·¥ãã¦åºåããPlaggerã®ä»çµã¿ã使ãæ¹ãç´¹ä»ãã¾ãã 1. ä½ã§ãã§ããï¼ Plaggerã®æ£ä½ã«è¿«ã ä»åã¯è©±é¡ã®Plaggerï¼ãã©ã¬ã¼ï¼ãåãä¸ãã¾ãã ãã®é£è¼ãèªãã§ããèªè ã®çããã¯ããããã¯ã¼ã¯æè¡ãç¥èã«èå³ãæã£ã¦ãã人ãå¤ãã§ãããããããPlaggerãã¨ããåèªã¯ä¸åº¦ã¯è³ã«ãããã¨ãããã§ããããããããPlaggerã¨ããè¨èãèãããã¨ã¯ãã£ã¦ãããã£ããã©ããªãã®ããã³ã¨æ¥ãªã人ãããããããã¾ãããä»åã¯Plaggerãã©ããã£ãåãããããï¼ ãã®åãã®ä»çµã¿ãªã©ãä¸å¿ã«ç´¹ä»ãã¦ããã¾ãã â
Japanese Plagger: the UNIX pipe programming for Web 2.0 Plagger is a pluggable RSS/Atom feed aggregator written in Perl. Everything is implemented as a small plugin and you can mash them up together to build a new application to handle RSS/Atom feeds. Ray Ozzie said RSS can be Unix Pipe of the Internet and that way Plagger is an Unix shell for Web 2.0! If you're familiar to Perl, Plagger is like a
é害
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}