ç§ãããã°ã©ãã³ã°ãããã¨ãã®ç¬¬ä¸è¨èªã¯ Perl ã§ããå¨å²ã«ã¯ãç§ã¯ Perl 以å¤ã®ããã°ã©ãã³ã°è¨èªã¯ãããããã¾ãããã¨å¿µãæ¼ããããã«ã¯ Perl ã°ããæ¸ãã¦ãã¾ãã ãããã2018å¹´ã®ä»æ¥ Perl ã¯ä¸å®ã®å½¹å²ãçµããå¤ãè¨èªã¨ã¿ãªãããã¡ã¤ã³ã¹ããªã¼ã ããã¯éããã¨å¤ãã®äººãèãã¦ãã¾ãã10å¹´åã®2008å¹´ãæãè¿ãã¦ããè¤æ°ã®å¯¾æè¨èªã®ç»å ´ã§ Perl ã«é°ãããã£ãäºã¯äºå®ã§ãããä»æ¥ã®ã¡ã¤ã³ã¹ããªã¼ã ã« Perl ãå± ãªããã¨ãæ¹ãã¦è¨ãå¿ è¦ãç¡ãã§ãããã ããã§ããªãç§ã¯ Perl ãæ¸ãç¶ããã®ããå°ãèãã¦ã¿ã¾ããã ç§ã¨ Perl ç§ã¨ Perl ã¨ã®æ¬æ ¼çãªåºä¼ãã®å ´ã¯ã大å¦é¢ãåæ¥ãã2003å¹´ã«å ¥ç¤¾ããITä¼æ¥ã§ãããã®ä¼ç¤¾ãã¡ã¤ã³ã§ä½¿ç¨ãã¦ããããã°ã©ãã³ã°è¨èªã Perl ã ã£ãã®ã§èªç¶ã¨ Perl ãæ¸ãããã«ãªãã¾ããã 2003å¹´3æ
Perl Hackers Hub 第44åLINE Messaging APIã§ä½ãchatbotâLINE::Bot::APIã¨ngrokã§ãæ軽ã«ï¼ï¼1ï¼ æ¬é£è¼ã§ã¯ç¬¬ä¸ç·ã®Perlããã«ã¼ãåæ¿ããã§å·çãã¦ããã¾ããä»åã®ããã«ã¼ã¯æ¬é£è¼ã®ç£ä¿®ãåãã大沢åå®ããã§ããã¼ãã¯ãLINE Messaging APIã§ä½ãchatbotãã§ãã æ¬ç¨¿ã®ãµã³ãã«ã³ã¼ãã¯ãæ¬èªãµãã¼ããµã¤ãããå ¥æã§ãã¾ãã LINE Messaging APIã¨ã¯ Messaging APIã¯LINEã®ãã©ãããã©ã¼ã ä¸ã§åä½ããchatbot[1]ãéçºããããã®APIã§ãã2017å¹´9æã«å ¬å¼SDKï¼Software Development Kitï¼ï¼â 注2ï¼ã¨ã¨ãã«æ£å¼ãªãªã¼ã¹ããã¾ãããéçºè ã¯Messaging APIãå©ç¨ãã¦ãLINEä¸ã§åä½ããchatbotãéçºã§ãã¾ãã çè ã¯ç¾å¨L
ã¯ããã« DBIxã¨ããã°Skinnyã§ããnihenã§ãã DBIï½ãã©ãã¯ã¨ãããªããDBIã®è©±ã§ãããã¿ãããªã®ã§ã«æ¸ãããã¨ã®ç¶ç·¨tipsãä¸ã¤æ¸ãã¾ãã§ãã DBI->connect_cachedã¨forkã®ç½ DBI->connect_cachedã¯åä¸ããã»ã¹ã§çæãããåä¸connectãªãã·ã§ã³ã®ãã¼ã¿ãã¼ã¹ãã³ãã«ããã£ãã·ã¥ãã¦ãããããè¿ãã¦ããã便å©ãªãã®ãªã®ã§ãããããã¨forkã®çµã¿åããã«ã¯ãã¯ãç½ ãåå¨ãã¾ãã use strict; use warnings; use DBI; use Data::Dumper; my $dbh = DBI->connect_cached('dbi:mysql:sandbox', 'sandbox', 'sandbox') or die $DBI::errstr; $dbh->do(q{DROP TABLE IF EXI
perl 㯠system perl ãããªã㦠perlbrew ã§å ¥ãã¦ãã¢ããªã§å¿ è¦ãª CPAN ã¢ã¸ã¥ã¼ã«ã¯å ¨ã¦ã¢ããªã®ãã£ã¬ã¯ããªä¸ã® extlib ã¨ãããã£ã¬ã¯ããªã«ã¤ã³ã¹ãã¼ã«ããæ¹å¼ã¯å人çã«ã¯ããæãã ããªãã¨æãã¤ã¤ãcron ã¨ã daemontools ããã¤ãã©ãããã®ãæ£è§£ãªã®ãåãããå°ã£ã¦ãã ã¾ãã»ããã¢ããããæ©ä¼ããã£ãã®ã§è²ã èããçµæããããªæããªãå²ã¨ãã£ããããæãã«ãªã£ãã env ãã®ãã¡ã¤ã«ããã¢ã§ãã¢ããªã®ãã£ã¬ã¯ããªã«ç§»åãã¤ã¤ãããæãã« perl ã¨ã PATH ã¨ã@INC ãè¨å®ãã¦ã渡ãããã³ãã³ããå®è¡ãã¦ãããã # perl -v This is perl, v5.8.8 built for x86_64-linux-thread-multi # ./env perl -v This is perl 5, versi
ã¢ãã³ãªPerlç°å¢æ§ç¯æ¹æ³ããç´¹ä»ãããã¨æãã¾ãã perlbrewã¯ããã¼ã ãã£ã¬ã¯ããªã«è¤æ°ã®perlãã¤ã³ã¹ãã¼ã«ãã¦åãæ¿ãããã¦ããããã¼ã«ã§ãã perlbrewã®ã¤ã³ã¹ãã¼ã« 以ä¸ã®ãããªã³ãã³ããå®è¡ããã¨ãprebrewãã¤ã³ã¹ãã¼ã«ã§ãã¾ãã $ curl -kL http://install.perlbrew.pl | bash perlbrewã®ã¤ã³ã¹ãã¼ã«æ¹æ³ã¯ããã¤ãããã¾ãã ä»ã®æ¹æ³ã¯ä»¥ä¸ã®ãµã¤ããåç §ãã¦ä¸ããã http://perlbrew.pl/ perlbrewã³ãã³ãã使ãããã«ã¤ã³ã¹ãã¼ã«ãããã³ãã³ãã«ãã¹ãéãè¨å®ãå¿ è¦ã§ãã bashãªãbashrcã«ä»¥ä¸ã®ãããªè¨å®ãæ¸ãã¨è¯ãã§ãããã source ~/perl5/perlbrew/etc/bashrc perlbrewã§Perlãã¤ã³ã¹ãã¼ã« 以ä¸ã®ã³ãã³ãã§ãå©ç¨ã§ããPer
* [Perl] ééã£ãPerlã³ãã¥ããã£ã®å¥³æ§ã®ç®ç«ãããã ä»æåããCPANããããAcmeã¢ã¸ã¥ã¼ã«ãåé¤ããã¾ãããããã¦ExtUtils::MakeMakerãªã©ã§æåãªSchwernæ°ããã®ãã¨ã«ã¤ãã¦How Not To Highlight Women In Perlã¨ããè¨äºãæ¸ãã¦ãã¾ãããç§ã¯ãAcmeå¤§å ¨2012ããã¤ããæºåã®éç¨ã§ãã®ä¸é£ã®ããã¨ããã¿ã¦ãèããããããç´¹ä»ããããªã¨æãã¾ãããããã§æ¬äººã®äºè§£ãå¾ã¦ããã«ç¿»è¨³ãããã®ãæ²è¼ãã¾ãï¼ãAcmeå¤§å ¨2012ãã®ä»é²ã«ãæ²è¼ãã¦ãã¾ãï¼ãã¢ã¸ã¥ã¼ã«åãAcmeã¾ã§åºã¦ãã¾ã£ã¦æ¬æ¥ã®è¨äºã®è¶£æ¨ã«å³å¯ã«ã¯åãã¦ããã®ã§ããããå¯æãã ããï¼æ¬äººã«ã¯ã©ã¡ãã«ãæ²è¼ãããã¨ã®äºè§£ãåãã¦ã¾ãï¼ã ééã£ãPerlã³ãã¥ããã£ã®å¥³æ§ã®ç®ç«ãããã è¦ç´ï¼ã¸ã§ã³ãã¼ã®å¿åæ§ã¯é²å¾¡ã§ãããç·æ§ãåªä½ãªã³ãã¥ãã
æãã¾ããªããã10å¹´ã®æ´å²ã«å¹ãã¨ããPerlã«ã³ãã¡ã¬ã³ã¹ãYAPC::Asia Tokyoãããã®éå¶ãæ ã£ã¦ããç§å¤§è¼ããï¼@lestrratï¼ã ããæ°ãã«ãbuildersconããªãã«ã³ãã¡ã¬ã³ã¹ãç«ã¡ä¸ãããã¼ãããã¹ã¿ã¼ãããæè¡ãæããå ¨ã¦ã®ã®ã¼ã¯éã®ãç¥ããã«ãããæãã¨ã¯ï¼ YAPC::Asia Tokyoã§å¾ãæå¿ããããã¦æ¬¡ã¸ CAREER HACKã§ãåè³ãããªã©å¿æ´ãã¦ãããYAPC::Asia Tokyoãã ããæãã¾ãã¤ã¤10å¹´ã«ãããæ´å²ã«å¹ãéããããããªYAPC::Asia Tokyoã®éå¶ãæ ãç¶ãã¦ããã®ãJapan Perl Associationç«ã¡ä¸ãã«ãæºãã£ãç§å¤§è¼ããï¼@lestrratï¼ã ã ãããªç§ãããæ°ãã«ãbuildersconããªãæè¡ã«ã³ãã¡ã¬ã³ã¹ãç«ã¡ä¸ããã¨ãããã¥ã¼ã¹ãé£ã³è¾¼ãã§ããã 2016å¹´12æ3æ¥ã«ç¬¬ä¸å
å ãã¿ Googleå çã«å°ããã¨ãã2010å¹´ã®advent calendar㧠ã¢ã¸ã¥ã¼ã«ã®ãã¼ã¸ã§ã³ã確èªããã¨ãã©ããã£ã¦ã¾ããï¼ ã«ã¤ãã¤ãç´¹ä»ããã¦ãã¾ããã®ã§ãããã¤ãèªåã§è©¦ãã¦ã¿ã¾ããã VERSIONå¤æ°ãprintãã $ perl -MDBI -le 'print $DBI::VERSION' 1.625 ãã£ã¨ãã·ã³ãã«ãªæ¹æ³ã§ããããã pmversã使ã # pmvers DBI 1.625 cpanm pmversã§ã¤ã³ã¹ãã¼ã«ããã¨pmtoolsã¨ããã³ãã³ãéã®ãããªãã®ãå ¥ãã¾ãã pmversã³ãã³ã以å¤ã«ãä¾ãã°pmallã¨æã¤ã¨ãã¹ã¦ã®ã¤ã³ã¹ãã¼ã«æ¸ã¿ã¢ã¸ã¥ã¼ã«ããã¼ã¸ã§ã³ã¨å ±ã«è¡¨ç¤ºããã¾ãã 巨大ãªãã¼ã¸ã§ã³çªå·ã§useãã¦æå³çã«ã¨ã©ã¼ã表示ããã¦ç¢ºèªãã # perl -e 'use DBI 9999' DBI version 9999 r
ã¤ã³ã¿ã¼ããããGoãJavaScriptãPythonãPerl ã«ããããã°ã©ãã³ã°ãISUCONãWindowsãRaspberry Pi ãªã©ãèå³ã®ããäºã«ã¤ãã¦æ°ã¾ããã«è¨äºãæ¸ãã¦ãã¾ãã Perlé¢ä¿ã®ãã¤ã¼ãããªãã¤ã¼ããããããããã @AE_PerlIsm ãåããã¦å¾ãããç¥è¦ã«ã¤ãã¦ã®è¨äºã§ãã ãã¼ã¯ã¼ããå«ãã ãã¤ã¼ãã¯ãTwitter Streaming API ã AnyEvent ããããæãã§åå¾ã§ãã AnyEvent::Twitter::Stream ã§åå¾ãã¦ããã®ã§ããããã®æ¥ç¶ã12ï½24æéã«1åãããåããããããªã®ã§ãåæ¥ç¶å¦çãå¿ è¦ã ã¨æãã¾ãã ãã®ã³ã¼ãã¯ä»¥ä¸ã®ãããªæãã§ãã£ã¦ãã¾ãã 注æç¹ã¯ã æ¥ç¶ç¶æ ããåããæ㯠wait ãªãã§åæ¥ç¶ããã æ¥ç¶æåã¯ã30ç§ããã«å±ã on_keepalive ã§å¤æããå ´åãããã
æ¬é£è¼ã§ã¯ç¬¬ä¸ç·ã®Perlããã«ã¼ãåæ¿ããã§å·çãã¦ããã¾ããä»åã¯æ®æ®µWebã¢ããªã±ã¼ã·ã§ã³ã®éçºãè¡ã£ã¦ããtokuhiromããã§ããã¼ãã¯Webã¢ããªã±ã¼ã·ã§ã³ãã¬ã¼ã ã¯ã¼ã¯Amon2ã§ãã Amon2ã¨ã¯ï¼ ããã«ã¡ã¯ãtokuhiromã§ããæ¬ç¨¿ã§ã¯ãçè ãä¸å¿ã¨ãªã£ã¦éçºãé²ãã¦ããAmon2ã¨ããWebã¢ããªã±ã¼ã·ã§ã³ãã¬ã¼ã ã¯ã¼ã¯ã«ã¤ãã¦èª¬æãã¾ãã Amon2ã¯ã次ã®ãããªç¹å¾´ãæã¤Webã¢ããªã±ã¼ã·ã§ã³ãã¬ã¼ã ã¯ã¼ã¯ã§ãã PSGI/Plackãã¼ã¹ Amon2ã¯HTTP::Engine/PSGI/Plackã®éçºï¼å¶å®ã«åæã®ããããé¢ãã£ã¦ããçè ãä½æããWebã¢ããªã±ã¼ã·ã§ã³ãã¬ã¼ã ã¯ã¼ã¯ã§ãããã®ãããPlackã®é¨åãã§ããéãå©ç¨ãããã¨ã«ãããå°ãªãã³ã¼ããã¼ã¹ã§Webã¢ããªã±ã¼ã·ã§ã³ãã¬ã¼ã ã¯ã¼ã¯ãå®ç¾ãã¦ãã¾ããããã«ããå¦ç¿ã³ã¹ããä½ããªã£ã¦ã
ç¥ã£ã¦ããã§æå¤ã¨ç¥ããã¦ããªãperlã®å°æ 10é¸ã¨ããè¨äºã«ãããã¢ã¸ã¥ã¼ã«ã®ã¡ã½ãããä¸æ¸ããããã¨ããé ã«ã¤ãã¦èãã¦ã¿ã¾ãããè¨äºã«ããããæ¹ã§ã¯ã æ¬æ¥ã®ã¡ã½ãã(ã³ã¼ã)ã®ãªãã¡ã¬ã³ã¹ãä¿å åã°ããã«ããã¡ã½ãããä¸æ¸ã ä¸æ¸ãããã¡ã½ãããå®è¡ ä¿åãã¦ããã³ã¼ããªãã¡ã¬ã³ã¹ãæ´ã«ä¸æ¸ã ã¨ãªã£ã¦ããã®ã§ãããããããããããä¸æ¸ããå¿ è¦ãªç®æã®ã¿ããããã¯({ ... })ã§å²ã¿ããã®ä¸ã§localã使ã£ã¦ä¸æ¸ãããæ¹ãããã®ã§ã¯ãã¨æã£ãã®ã§ããå ·ä½çã«æ¸ãã¨ä»¥ä¸ã®éãã use strict; use warnings; #---------- package Foo; sub something { print "something original.\n" }; #---------- package main; Foo->something(); { no
ããã (@xtetsuji) ã§ãã 2015å¹´4æ3æ¥ï¼éææ¥ï¼ã1社ç®ã§æå¾ã¾ã§ä¸ç·ã«åãã¦ããå¾è¼©ã¨äºäººã§ä¹ ã ã«é£²ã¿ä¼ããã¾ãããããã§èãã¦èªã£ãã¬ã¬ã·ã¼éçºè«ãªã©ãå ¬éãã¦ãè¯ããããªã¨ãããæ¸ãã¦ã¿ã¾ããç§ã¯2014å¹´1æã«éè·ãã¦ãã¾ãããå¾è¼©ã¯ä»ãå¨è·ãã¦ãã¾ãã 飲ã¿ä¼ (@ å± é å± ã ãã¶ã¤ in Shibuya, æ±äº¬é½) https://t.co/Xl4yJEqZRK pic.twitter.com/yA7ekhowXX â OGATA Tetsuji (@xtetsuji) April 3, 2015 æ¸ããããã¨ã¯ãã£ã¨æ¸ããã®ã§ãããæ¨æ²ããã¾ãã§ããªãã¦é·æã«ãªã£ã¦ãã¾ãã¾ãããæãªæã«æµãèªã¿ãã¦ããã ãã®ãã¡ããã©ããããããã¾ãããé·ãããã°è¨äºãKindleã§é»ååºçããã»ããããããããã¾ãããâ¦ã å·çä¾é ¼ãã¢ã¸ã¥ã¼ã«é¡ã®ããã¥ã¡ã³ãåä¾é ¼ã¯é
å æ¥âãªã¿ã¤ãã«ã§ $res->base ã使ãã¨ããããã¨ãæ¸ãã¾ãããããã§ãããããã¾ãããæ¶ãã¡ãã£ãã®ã§ permalink ãªããªãã¾ããããããã¯ããã¦ããã人ããããéãã¦ããã¾ããã ã§ã HTTP::Response ã®ããã¥ã¢ã«ãã¡ããã¨èªãã§ãä»åº¦ã¯å¤§ä¸å¤«ããªã¨æã£ãã®ã§ã¡ã¢ã æ¤è¨¼ã³ã¼ã ãªãã¤ã¬ã¯ãå ã® URL ãå¾ãã«ã¯ my $response = $ua->get($url); my $uri = $response->request->uri; print $uri;ããã§ããã $uri 㯠URI ã¢ã¸ã¥ã¼ã«ã®ã¤ã³ã¹ã¿ã³ã¹ããµã¤ãã« get ã¨ããã¦å¸°ã£ã¦ãã $response ãæçµçã« 30x ãããªãã¹ãã¼ã¿ã¹ã³ã¼ããè¿ãããã¬ã¹ãã³ã¹ã®ãªãã¸ã§ã¯ããªã®ã§ããã®ã¬ã¹ãã³ã¹ãçºçããããªã¯ã¨ã¹ã (->request) ããã©ã£ã¦ãã® uri
è±èªã®å¤§æåã¨å°æåãå ¥ãæ¿ãããå ´åã«ä»¥ä¸ã®ããã«ãã¦ããã¡ã ã my $str = "How I wonder what you are.\n"; $str =~ s/[A-Z]/lc($&)/ge; $str =~ s/[a-z]/uc($&)/ge; print $str; http://ideone.com/IJRrI ãã¹ã¦å¤§æåã«ãªã£ã¦ãã¾ãã ããã§ãtr///ãªããã®ã使ãã¾ããããã¨ã my $str = "How I wonder what you are.\n"; $str =~ tr/A-Za-z/a-zA-Z/; print $str; http://ideone.com/l1nsG tr/ç½®æå ã®æåãªã¹ã/ç½®æå ã®æåãªã¹ã/ãªãã·ã§ã³ ããã使ãã¨ãç½®æå ã®æåãªã¹ãããç½®æå ã®æåãªã¹ãã¸ã®å¤æãè¡ããã¾ãã ã¨ãããã¨ã ãã©ã ãªãã§A-Zãa-zã«ã
Encode.pmã®ã¡ã³ããDan Kogaiæ°ã«ãããæ¥æ¬èªæ°åã¨ã¢ã©ãã¢æ°åã®ç¸äºå¤æãè¡ãPerlã¢ã¸ã¥ã¼ã«ã§ãã ãµã³ãã« - #!/usr/bin/perl -w use strict; use utf8; binmode STDOUT, ":encoding(cp932)"; binmode STDERR, ":encoding(cp932)"; use Lingua::JA::Numbers ':all'; my $n = "9876543210"; print "$n -> ", num2ja($n), "\n"; $n = "1234567890"; print "$n -> ", num2ja($n, {style=>'daiji'}), "\n"; $n = "54321"; print "$n -> ", num2ja($n, {style=>'hiragana'}
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}