Perl ⺠æåã³ã¼ã ⺠Unicode ⺠ã³ã¼ããã¤ã³ã ããæåã®ã¦ãã³ã¼ãã®ã³ã¼ããã¤ã³ããç¥ãããå ´åã¯ã次ã®ããã«ãã¾ããutf8ãã©ã°ãã¯æå¹ã«ãã¦ãã½ã¼ã¹ã³ã¼ããUTF-8ã§ä¿åããå¿ è¦ãããã¾ãã use utf8; my $str = 'ã'; # åå é²æ°ã¨ãã¦è¡¨ç¤º printf "%x\n", ord($str); ordé¢æ°ã§æåã®ã³ã¼ããã¤ã³ããç¥ããã¨ãã§ãã¾ããprintfé¢æ°ã§%xã¨ãããã©ã¼ãããæå®ããã¦16é²æ°ã§è¡¨ç¤ºãã¦ãã¾ãã åºåçµæã¯ä»¥ä¸ã®ããã«ãªããããã¨ããæåã®ã³ã¼ããã¤ã³ãã¯3042ã§ãããã¨ããããã¾ãã 3042 Data::Dumperã§ç°¡æçã«èª¿ã¹ã Data::Dumperã¢ã¸ã¥ã¼ã«ã使ã£ã¦ç°¡æçã«èª¿ã¹ãæ¹æ³ãããã¾ããData::Dumperã¯ASCIIã®ç¯å²ã§ãªãæåã§ããã°ãå é¨æååãåºåããã¨ãã«ãã³ã¼ããã¤ã³ã
Perlå ¥å¦å¼ å ¨6åã®Perlå ¥éè¬åº§ãæ±äº¬ã大éªãæ²ç¸ãæå¹ã§éå¬ã(æ±äº¬ã¯4æã¨10æã¹ã¿ã¼ãããã以å¤ã¯5æã¹ã¿ã¼ã) YAPC::Japan Perlã軸ã¨ããITã«é¢ããå ¨ã¦ã®äººã®ããã®ã«ã³ãã¡ã¬ã³ã¹ã æ±äº¬ å祥寺.pm äºåç°.pm å¤§éª ãªã«ãPerl æ²ç¸ æ²ç¸.pm
Perl ⺠é¢æ° ⺠here undefé¢æ°ã使ãã°ãæªå®ç¾©å¤ãè¨å®ãããã¨ãã§ãã¾ãããããã¯ãå¼æ°ã«æå®ããå¤æ°ã®å¤ãæªå®ç¾©ã«ãã¾ãã undef undef(å¤æ°) æªå®ç¾©å¤ã®è¨å®ã¯æ¬¡ã®ããã«è¡ãã¾ããå¤æ°ã$nameãã®å¤ãæªå®ç¾©ã«ãªãã¾ãã $name = "Kimoto"; $name = undef; ã¾ã次ã®ããã«undefé¢æ°ã®å¼æ°ã«å¤æ°ã渡ãã¦ããå¤æ°ã®å¤ãæªå®ç¾©ã«ãããã¨ãã§ãã¾ãã $name = "Kimoto"; undef $name; é åãããã·ã¥ã«ã¤ãã¦ãundefé¢æ°ãå©ç¨ãããã¨ãã§ãã¾ãã @names = undef; undef @names; %scores = undef; undef %score; æªå®ç¾©å¤ã®å¤å® æªå®ç¾©å¤ãã©ãããå¤å®ããããã«ã¯definedé¢æ°ã使ç¨ãããã¨ãã§ãã¾ããå®ç¾©ããã¦ããå ´åã¯çããæªå®ç¾©ã®å ´åã¯å½
æ£è¦è¡¨ç¾ã§ä¸çºã§ããã ãããããã£ã¬ã¯ããªã®åºåããã/ãã¨ã\ãããã®ã§ãæ°ãã¤ããªãã¨ãªãã¾ããã æ¨æºã¢ã¸ã¥ã¼ã«Basenameã使ãã¨ãã£ã¨ç°¡åã«åºæ¥ã¾ããã ã ããBasenameã¢ã¸ã¥ã¼ã«ã®fileparseé¢æ°ã¯ããªã¹ããè¿ãã¾ãã®ã§å°ã«ãã³ã§ã¹ã©ã¤ã¹ãã¦ããã¡ã¤ã«åãåå¾ãã¾ãã use strict; use warnings; use File::Basename; my $file_path1 = 'C:\Documents and Settings\koike\hoge\fname.pl'; my $file_path2 = '/cygdrive/c/Documents and Settings/koike/hoge/fname.pl'; $file_path1 =~ /(.*\/|.*\\)(.*)$/; print $2, "\n"; $file_path2
EXCELã¨ãDBã§ã¯ããã¼ã¿ã表形å¼ãªã£ã¦ãã¦ãè¡ã¨åã§ãã¼ã¿ã«ã¢ã¯ã»ã¹ãã¾ãã è¡ã¯é åã§è¡¨ç¾ããåã¯ããã·ã¥ã§è¡¨ç¾ããã®ããã¾ãæ®éã ã¨æãã¾ãã ãã¨ãã°ã以ä¸ã®è¡¨ã®æãã§ãã AåBåCåDå 1è¡0 1 2 3 2è¡0 1 2 3 3è¡0 1 2 3 4è¡0 1 2 3 ã¾ããååãããã·ã¥ãã¼ã«ãã¦ãä¸è¡åã®ãã¼ã¿ãããã·ã¥å¤æ°ã«æ ¼ç´ãã¾ãã ããã¦ããã®ããã·ã¥å¤æ°ã®å 容ãç¡åããã·ã¥ã®è¦ç´ ã¨ãããã®ç¡åããã·ã¥ã®ãªãã¡ã¬ã³ã¹ãä»åº¦ã¯é åã®è¦ç´ ã¨ãã¦æ ¼ç´ãã¾ãã ããã¨ãããã·ã¥ã®é åã«ãªããè¡ã¯é åæ°ã§è¡¨ç¾ãããåã¯ããã·ã¥åã§è¡¨ç¾ãåºæ¥ãã®ã§ãã use strict; use warnings; my @col; my %row; for (my $j = 0; $j < 4; $j++) { # 1, ååãããã·ã¥ãã¼ã«ãã¦ä¸è¡åã®ãã¼ã¿ãããã·ã¥å¤æ°ã«æ ¼ç´ãã
Perlå ¥å¦å¼ å ¨6åã®Perlå ¥éè¬åº§ãæ±äº¬ã大éªãæ²ç¸ãæå¹ã§éå¬ã(æ±äº¬ã¯4æã¨10æã¹ã¿ã¼ãããã以å¤ã¯5æã¹ã¿ã¼ã) YAPC::Japan Perlã軸ã¨ããITã«é¢ããå ¨ã¦ã®äººã®ããã®ã«ã³ãã¡ã¬ã³ã¹ã æ±äº¬ å祥寺.pm äºåç°.pm å¤§éª ãªã«ãPerl æ²ç¸ æ²ç¸.pm
ãã®å®è£ ã ã¨ãã®ãããã®é ãã§ãã è¦ç´ æ°ããå°ãªãå ´åã¯ã¾ããããªã«æéãããããªãããªã¼ã¨ããæãã§ããããã1000è¡ãããã®CSSãã¡ã¤ã«ãå¦çããããã¤ã¾ã§ãçµãããªãã§ãããã åé¡ã®åæã¯ä»¥ä¸ã®å ´æã sub check_order { my $line = shift; my $order = 0; for (my $i = 0; $i <= $#property_order; $i++) { if ($line =~ /^\s*$property_order[$i]:/) { $order = $i; last; } } return $order; } 1ã¤ã®è¦ç´ çªå·ãå¾ãããã«ãæ¯åãæ大æ°ç¾åã®foræï¼ãã®ããã°ã©ã ã ã¨454åï¼ãå®è¡ããã¾ãã ããããããsortã®ãã³ã«çºçããã®ã§ãã¨ãã§ããªãåæ°ã®å¦çï¼ææªã§O(n2)*O(n)ï¼ãããããããã©ï¼ãçºç
Perlå ¥å¦å¼ å ¨6åã®Perlå ¥éè¬åº§ãæ±äº¬ã大éªãæ²ç¸ãæå¹ã§éå¬ã(æ±äº¬ã¯4æã¨10æã¹ã¿ã¼ãããã以å¤ã¯5æã¹ã¿ã¼ã) YAPC::Japan Perlã軸ã¨ããITã«é¢ããå ¨ã¦ã®äººã®ããã®ã«ã³ãã¡ã¬ã³ã¹ã æ±äº¬ å祥寺.pm äºåç°.pm å¤§éª ãªã«ãPerl æ²ç¸ æ²ç¸.pm
ã¯ã¦ãªã°ã«ã¼ãã®çµäºæ¥ã2020å¹´1æ31æ¥(é)ã«æ±ºå®ãã¾ãã 以ä¸ã®ã¨ã³ããªã®éããä»å¹´æ«ãç®å¦ã«ã¯ã¦ãªã°ã«ã¼ããçµäºäºå®ã§ããæ¨ããç¥ãããã¦ããã¾ããã 2019å¹´æ«ãç®å¦ã«ãã¯ã¦ãªã°ã«ã¼ãã®æä¾ãçµäºããäºå®ã§ã - ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ ãã®ãã³ãæ£å¼ã«çµäºæ¥ã決å®ãããã¾ããã®ã§ã以ä¸ã®éãã確èªãã ããã çµäºæ¥: 2020å¹´1æ31æ¥(é) ã¨ã¯ã¹ãã¼ãå¸æç³è«æé:2020å¹´1æ31æ¥(é) çµäºæ¥ä»¥éã¯ãã¯ã¦ãªã°ã«ã¼ãã®é²è¦§ããã³æ稿ã¯è¡ãã¾ãããæ¥è¨ã®ã¨ã¯ã¹ãã¼ããå¿ è¦ãªæ¹ã¯ä»¥ä¸ã®è¨äºã«ãããã£ã¦æç¶ãããã¦ãã ããã ã¯ã¦ãªã°ã«ã¼ãã«æ稿ãããæ¥è¨ãã¼ã¿ã®ã¨ã¯ã¹ãã¼ãã«ã¤ã㦠- ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ ãå©ç¨ã®ã¿ãªãã¾ã«ã¯ãè¿·æãããããããã¾ãããã©ãããããããé¡ããããã¾ãã 2020-06-25 è¿½è¨ ã¯ã¦ãªã°ã«ã¼ãæ¥è¨ã®ã¨ã¯ã¹ãã¼ããã¼ã¿ã¯2020å¹´2æ28
Perl ⺠ãã¡ã¤ã«å ¥åºå ⺠here å®éã«csvãã¡ã¤ã«ãèªã¿è¾¼ãã§ãPerlã®ãã¼ã¿å(é åã®é å)ã«å¤æãã¦ãæ¨æºåºåã«æ¸ãåºããµã³ãã«ã§ããcsvããé åã®é åã¸ã®å¤æã¯ãµãã«ã¼ãã³ã使ã£ã¦è¡ã£ã¦ãã¾ããä½ããã®ãã¡ã¤ã«ãèªã¿è¾¼ãã§ç·¨éããã¨ãã£ãå ´åã®åºæ¬çãªéå½¢ã«ããªãã¨æãã¾ãã use strict; use warnings; # å¼æ°ã®å¦ç my $file = shift; unless ($file) { # å¼æ°ããªãã¨ãã¯ã使ç¨æ¹æ³ã示ãã¦çµäºã die "Usage: $0 file"; } # ãã¡ã¤ã«ã解æãã¦csvå½¢å¼ã®ãã¼ã¿ãé åã®é åã«å¤æã my @recs = parse_file($file); # åºå( 2次å é åãªã®ã§ãforã§ãã©ã ) for my $items (@recs) { # ã«ã³ãã§é£çµãã¦åºåã print joi
2008å¹´06æ10æ¥16:00 ã«ãã´ãªLightweight Languages perl - Lingua::CJKV::Simplify ã§ç°¡åç¹ç ãããã ã¯ãªãªã³ãã³ãã«ã¼ ãè¦ããããããä½ããããªã£ã¦ãä½ã£ãããã£ããã§ãã¡ãã£ãã¨ããã /lang/perl/Lingua-CJKV-Simplify/trunk - CodeRepos::Share - Trac NAME Lingua::CJKV::Simplify - (Simplified|Traditional) Chinese Characters SYNOPSIS use Lingua::CJKV::Simplify; my $cjkv = Lingua::CJKV::Simplify->new( "Dan,\x{5F3E},\x{5F48},\x{5F39}" ); print $cjkv, $cjkv->
open ã¯ããã¡ã¤ã«ãéããªãã£ãå ´åã«æªå®ç¾©å¤ï¼å½ï¼ãè¿ãã®ã§ããããå¦å®ï¼!ï¼ããçã«ãã¦ã¨ã©ã¼åå¾ãè¡ãã¾ãã ãªã¼ã½ããã¯ã¹ if(!open FH, ">ABC.txt") { die "open error $!"; }ä¸è¨ãä¸è¨ã®ããã«è¨è¿°ãããã¨ãã§ãã¾ãã ãorãã¨ã||ãã¯ãopen é¢æ°ãè©ä¾¡ãã¦ãã¡ã¤ã«ãéãï¼çï¼ãã¨ãã§ããã°ãdieé¢æ°ãè©ä¾¡ããã«æ¬¡ã®è¡ã«å¦çã移ãã¾ãã ãorãã¨ã||ãã®éãã¯ãè©ä¾¡ã®åªå é ä½ããorãã¯ã||ãã«æ¯ã¹ã¦ä½ãã®ã§ãã ã¹ãã¼ã open(FH, ">ABC.txt") or die "open error $!"; ã¾ã㯠open FH, ">ABC.txt" or die "open error $!"; ã¾ã㯠open(FH, ">ABC.txt") || die "open error $!";ããããä¸è¨ãä¸
@Array=();ã«ããã¨åè¦ç´ ã«ã¢ã¯ã»ã¹ããæã¯ãæªå®ç¾©ã«ãªãã¾ãã ã§ã¯ãä»»æã®ä¸æåã§åæåããã«ã¯ãã©ããããããã§ããããï¼ ãã¨ãã°ãï¼ï¼åã"0"ãã§åæåããã«ã¯ã以ä¸ã®æãã @Array = ("0", "0", "0", "0", "0", "0", "0", "0", "0", "0");ã¹ãã¼ãã«æ¸ã㨠@Array = ("0") x 10;æãç®è¨å·ã«ã¨ãã¯ã¹ã使ããªãã¦ãªãã£ã¡ã 以ä¸ã¯ãåºæ¥ããã ãã©NGã§ãã @Array = map {$_ . "0"} @Array;æªå®ç¾©ã¨æååã¯é£çµã§ããªãããã§ããã¦ããããããã§ããã大å¤ãªãã¨ã«ãªãï¼è¬ï¼ã è¦ç´ æ°ã0ã§ãããã{ }å ãä¸åº¦ãå®è¡ãããªãããã§ã¯ãªãã§ããããã ç§ãããæãã¾ããï¼ãææåããã¾ã§ã¯ãæ°ã¥ãã¾ããã§ããï¼ kitsããããã¤ããææãããã¨ããããã¾ãã
以ä¸ã®ããã«onclickããJavaScriptã®é¢æ°ãã³ã¼ã«ããå ´åã¯ãã'ãã¯ã¨ã¹ã±ã¼ãï¼\'ï¼ããªãã¨å¼æ°ã¨ãã¦æ¸¡ããªãã 以ä¸ã§ã確èªãã¾ããããã ãIEï¼ã®ã¿ç¢ºèªã <html> <body> <form name="FM"> <input type="text" name="IP" value="ã±ã¼ã¹ï¼ï¼åå¿ãã" onclick="subx('cb\'b"\\bc')"> <input type="text" name="IP" value="ã±ã¼ã¹ï¼ï¼åå¿ãªã" onclick="subx('cb'b"\\bc')"> <input type="text" name="IP" value="ã±ã¼ã¹ï¼ï¼åå¿ãªã" onclick="subx('cb'b"\\bc')"> </form> <script> fun
ãã®å©ç¨è¦ç´ã¯ãæ ªå¼ä¼ç¤¾ã¯ã¦ãª(以ä¸ãå½ç¤¾ã)ãæ¬ãµã¤ãä¸ã§æä¾ããå ¨ã¦ã®ãµã¼ãã¹(以ä¸ãæ¬ãµã¼ãã¹ã)ã«ãããå©ç¨æ¡ä»¶ãå®ãããã®ã§ããã¦ã¼ã¶ã¼ã®ã¿ãªãã¾(以ä¸ãã¦ã¼ã¶ã¼ã)ã«ã¯ãæ¬è¦ç´ã«å¾ãæ¬ãµã¼ãã¹ããå©ç¨ããã ãã¾ãã ä¸ä¾ã¨ãã¦ã¯ã¦ãªã®å©ç¨è¦ç´ããå¼ç¨ããã¦ããã£ããã"(以ä¸ãå½ç¤¾ã)"çã®è¡¨ç¾ã«ããã¦"å½ç¤¾"ã¨ããæåã«"æ ªå¼ä¼ç¤¾ã¯ã¦ãª"ãçµã³ä»ãã¦ããã¤ã¾ãã"å½ç¤¾"ã¨ããæåã¯"æ ªå¼ä¼ç¤¾ã¯ã¦ãª"ãå®ç¾©ãã¦ããã¨è¨ãããããã ã¨ããã°ããã®å ´åã®"å½ç¤¾"㯠dfn è¦ç´ ã§ãã¼ã¯ã¢ãããã¹ãã§ã¯ãªãããã¨ãæã£ããã©ããªãã ããã ã©ãã§ãããããç§ã¯ dfn è¦ç´ ããã©ãµãããããã¨å¼ãã§ããã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}