­¸ Perl¤ÎÀâÌÀ
¥¦¥£¥ó¥É¥¦¤òÊĤ¸¤ë


¡¡µ­¹æº÷°ú ¡¡¡¡¡¡ ! # $¡¡¡¡ % & (¡¡¡¡ * .¡¡¡¡ / ? @¡¡¡¡ [ ] ^ { }¡¡¡¡ | || ~ +¡¡¡¡ < == > ¡¡¡¡ \ ¡¡¡¡ 0 e eq ge gt le lt ne

Perl ¤Ç¤ß¤é¤ì¤ëÍÍ¡¹¤Êµ­¹æ¤òº÷°ú¤Ë¤·¤Þ¤·¤¿¡£³ºÅöµ­¹æ¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¢¸µ¤Î¥Ú¡¼¥¸¤Î±¦¥Õ¥ì¡¼¥à¤Ë³ºÅö²Õ½ê¤ÎÆâÍƤòɽ¼¨¤·¤Þ¤¹¡£


Noµ­¹æʬÎà°ÕÌ£ÎãÀâÌÀ²Õ½ê
001--»»½Ñ±é»»¸º»»$a--4.»»½ÑŽ¥ÏÀÍý
002-»»½Ñ±é»»¸º»»$a = $a - 14.»»½ÑŽ¥ÏÀÍý±é»»
003-=»»½Ñ±é»»¸º»»$a -= 14.»»½ÑŽ¥ÏÀÍý±é»»
004-A¥Õ¥¡¥¤¥ë¥Æ¥¹¥È
±é»»»Ò
¥Õ¥¡¥¤¥ë¤Î¥¢¥¯¥»¥¹Æü¿ô-A $file7.¥Õ¥¡¥¤¥ëÁàºî
005-e¥Õ¥¡¥¤¥ë¥Æ¥¹¥È
±é»»»Ò
¥Õ¥¡¥¤¥ë¤¬¤¢¤ë-e $file7.¥Õ¥¡¥¤¥ëÁàºî
006-M¥Õ¥¡¥¤¥ë¥Æ¥¹¥È
±é»»»Ò
¥Õ¥¡¥¤¥ë¤ÎÊѹ¹Æü¿ô-M $file7.¥Õ¥¡¥¤¥ëÁàºî
007-s¥Õ¥¡¥¤¥ë¥Æ¥¹¥È
±é»»»Ò
¥Õ¥¡¥¤¥ë¤Î¥µ¥¤¥º-s $file7.¥Õ¥¡¥¤¥ëÁàºî
008-z¥Õ¥¡¥¤¥ë¥Æ¥¹¥È
±é»»»Ò
¥Õ¥¡¥¤¥ë¤ÎÂ礭¤µ¤¬0-z $file7.¥Õ¥¡¥¤¥ëÁàºî
009!ÏÀÍý±é»»»ÒÏÀÍýÈÝÄê!$x4.»»½ÑŽ¥ÏÀÍý±é»»
010!=¿ôÃͱ黻»Ò¿ôÃͤ¬Åù¤·¤¯¤Ê¤¤$x != $y5.¾ò·ïŽ¥±é»»»Ò
011 #¥³¥á¥ó¥È¥³¥á¥ó¥È¹Ô# comment3.Perl ¤Î´ðËÜ
012$Àµµ¬É½¸½ËöÈøif ($str =~ /xyz$/)¢¨Àµµ¬É½¸½
013$ÊÑ¿ôÊÑ¿ô̾¤Ë¤Ä¤±¤ëµ­¹æ$a¡¡¡¡ÊÑ¿ô̾ a4.»»½ÑŽ¥ÏÀÍý±é»»
014$!Æüì¤ÊÊÑ¿ôerrno ÃÍËô¤Ï¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸print "open error :$!";2.ÊÑ¿ô
015$#Æüì¤ÊÊÑ¿ôÇÛÎó¤ÎºÇ¸å¤ÎÍ×ÁǤÎź»ú for($i=0; $i<=$#a; $i++)
# ÇÛÎóÊÑ¿ô @a
2.ÊÑ¿ô
016$.Æüì¤ÊÊÑ¿ôÆþÎϹÔÈÖ¹æprint "$. $_";2.ÊÑ¿ô
017$/Æüì¤ÊÊÑ¿ô¶èÀڤ국¹æ2.ÊÑ¿ô
018$_Æüì¤ÊÊÑ¿ôÊÑ¿ôµ¬ÄêÃÍ2.ÊÑ¿ô
019%Ï¢ÁÛÇÛÎóÏ¢ÁÛÇÛÎóÊÑ¿ô̾%ÊÑ¿ô̾3.ÇÛÎó
020&ÆâÉô¥µ¥Ö¥ë¡¼¥Á¥ó¥µ¥Ö¥ë¡¼¥Á¥ó¤Î¸Æ¤Ó½Ð¤·&sub(..);8.ÆâÉô¥µ¥Ö¥ë¡¼¥Á¥ó
021&ÏÀÍý±é»»¥Ó¥Ã¥ÈÏÀÍýÀÑ$x & $y4.»»½ÑŽ¥ÏÀÍý±é»»
022&&ÏÀÍý±é»»ÏÀÍýÀÑ$x && $y4.»»½ÑŽ¥ÏÀÍý±é»»
023( )Àµµ¬É½¸½¥°¥ë¡¼¥×²½¢¨Àµµ¬É½¸½
024*»»½Ñ±é»»¾è»»$a = $a * $b4.»»½ÑŽ¥ÏÀÍý±é»»
025*Àµµ¬É½¸½Ä¾Á°¤Îɽ¸½¤¬ 0¸Ä°Ê¾å¤¢¤ë¾ì¹çab* # ab,xabc,a
(b ¤¬Ìµ¤·²Ä)¤¬¥Þ¥Ã¥Á
¢¨Àµµ¬É½¸½
026**»»½Ñ±é»»¤Ù¤­¾è$a = $a ** 3;4.»»½ÑŽ¥ÏÀÍý±é»»
027**=»»½Ñ±é»»¤Ù¤­¾è$a **= 3;4.»»½ÑŽ¥ÏÀÍý±é»»
028*=»»½Ñ±é»»¾è»»$a *= $b4.»»½ÑŽ¥ÏÀÍý±é»»
029.Àµµ¬É½¸½Ç¤°Õ¤Î£±Ê¸»ú(²þ¹Ô¤ò½ü¤¯)( . |\n)¢¨Àµµ¬É½¸½
030.ʸ»úÎó¤Î·ë¹çʸ»úÎó¤Èʸ»úÎó¤ò·ë¹ç$a = $b . $c3.ÂåÆþŽ¥·ë¹çŽ¥ÇÛÎó
031.=ʸ»úÎó¤Î·ë¹çʸ»úÎó¤Èʸ»úÎó¤ò·ë¹ç$a .= $b3.ÂåÆþŽ¥·ë¹çŽ¥ÇÛÎó
032/»»½Ñ±é»»½ü»»$a=$a/$b4.»»½ÑŽ¥ÏÀÍý±é»»
033/=»»½Ñ±é»»½ü»»$a/=$b4.»»½ÑŽ¥ÏÀÍý±é»»
034?Àµµ¬É½¸½Ä¾Á°¤Îɽ¸½¤¬ 0¤«1¸Ä¤¢¤ë¾ì¹ç¢¨Àµµ¬É½¸½
035@ÇÛÎóÊÑ¿ôÇÛÎóÊÑ¿ô̾@a1=('blue','red')3.ÂåÆþŽ¥·ë¹çŽ¥ÇÛÎó
036@ARGVÊÑ¿ô¥³¥Þ¥ó¥É¹Ô¤Î°ú¿ô¤ÎÇÛÎó10.¥³¥Þ¥ó¥É°ú¿ô
037[ ]Àµµ¬É½¸½Ê¸»ú¥¯¥é¥¹»ØÄꢨÀµµ¬É½¸½
038[ ]ÇÛÎóÍ×ÁÇn ÈÖÌܤÎÍ×ÁÇ$a[0] $a[1] .. $a[n]3.ÂåÆþŽ¥·ë¹çŽ¥ÇÛÎó
039^ÏÀÍý±é»»¥Ó¥Ã¥ÈÇÓ¾ŪÏÀÍýÏÂ$x ^ $y4.»»½ÑŽ¥ÏÀÍý±é»»
040^Àµµ¬É½¸½ÀèƬif ($str =~ /^abc/)¢¨Àµµ¬É½¸½
041{ }Ï¢ÁÛÇÛÎó¥­¡¼¤ÇÏ¢ÁÛ¤µ¤ì¤ëÍ×ÁÇ$a{'Mar'}3.ÂåÆþŽ¥·ë¹çŽ¥ÇÛÎó
042{ }Àµµ¬É½¸½¥Ö¥ì¡¼¥¹([A-Z0-9_.~]+) $1¢¨Àµµ¬É½¸½
043 { }´ðËÜʸ¤Î¥Ö¥í¥Ã¥¯if(..) { ... }3.Perl ¤Î´ðËÜ
044|¥Ñ¥¤¥×¥Ñ¥¤¥×open(OUT, "|sort>xxx.txt")7.¥Õ¥¡¥¤¥ëÁàºî
045|ÏÀÍý±é»»¥Ó¥Ã¥ÈÏÀÍýÏÂ$x | $y4.»»½ÑŽ¥ÏÀÍý±é»»
046|Àµµ¬É½¸½ÁªÂò¢¨Àµµ¬É½¸½
047||ÏÀÍý±é»»ÏÀÍýÏÂ$x || $y4.»»½ÑŽ¥ÏÀÍý±é»»
048~ÏÀÍý±é»»¥Ó¥Ã¥ÈÈÝÄê~$x4.»»½ÑŽ¥ÏÀÍý±é»»
049+»»½Ñ±é»»²Ã»»$a = $a + 14.»»½ÑŽ¥ÏÀÍý±é»»
050+Àµµ¬É½¸½Ä¾Á°¤Îɽ¸½¤¬ 1¸Ä°Ê¾å¤¢¤ë¾ì¹ç¢¨Àµµ¬É½¸½
051++»»½Ñ±é»»1 ²Ã»»$a++4.»»½ÑŽ¥ÏÀÍý±é»»
052+<open ¥â¡¼¥Éopen¡¡´û¸ÆþÎÏopen(FILE,"+7.¥Õ¥¡¥¤¥ëÁàºî
053+=»»½Ñ±é»»²Ã»»$a += 14.»»½ÑŽ¥ÏÀÍý±é»»
054+>open ¥â¡¼¥Éopen¡¡¾å½ñ¤­open(FILE,"+>file");7.¥Õ¥¡¥¤¥ëÁàºî
055+>>open ¥â¡¼¥Éopen¡¡´û¸Äɲà open(FILE,"+>>file");7.¥Õ¥¡¥¤¥ëÁàºî
056<open ¥â¡¼¥Éopen¡¡¤Î½ÐÎÏopen(FILE,">file");7.¥Õ¥¡¥¤¥ëÁàºî
057<¿ôÃͱ黻»Ò¿ôÃͤ¬¾®¤µ¤¤$x < $y5.¾ò·ïŽ¥±é»»»Ò
058<<Äê¿ô¥Ò¥¢Ê¸»úÎó<<ʸ»úÎó1.Äê¿ô
059<<ÏÀÍý±é»»¥Ó¥Ã¥È¥·¥Õ¥È<<$x4.»»½ÑŽ¥ÏÀÍý±é»»
060<=¿ôÃͱ黻»Ò¿ôÃͤ¬¾®¤µ¤¤¤«Åù¤·¤¤$x <= $y5.¾ò·ïŽ¥±é»»»Ò
061<>ÆþÎÏÆþÎÏ¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥é¡¼¤Î»ØÄêwhile($rec = <IN>)7.¥Õ¥¡¥¤¥ëÁàºî
062<>ɸ½àÆþÎÏ¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥é¡¼¾Êά$a = <>;7.¥Õ¥¡¥¤¥ëÁàºî
063==¿ôÃͱ黻»Ò¿ôÃͤ¬Åù¤·¤¤$x == $y5.¾ò·ïŽ¥±é»»»Ò
064>¥ª¡¼¥×¥ó¥â¡¼¥Éopen¡¡¤ÎÆþÎÏopen(FILE,"7.¥Õ¥¡¥¤¥ëÁàºî
065>¿ôÃͱ黻»Ò¿ôÃͤ¬Â礭¤¤$x > $y5.¾ò·ïŽ¥±é»»»Ò
066>=¿ôÃͱ黻»Ò¿ôÃͤ¬Â礭¤¤¤«Åù¤·¤¤$x >= $y5.¾ò·ïŽ¥±é»»»Ò
067>>open ¥â¡¼¥Éopen¡¡ÄɲÃopen(FILE,">>file");7.¥Õ¥¡¥¤¥ëÁàºî
068>>ÏÀÍý±é»»¥Ó¥Ã¥È¥·¥Õ¥È>>$x4.»»½ÑŽ¥ÏÀÍý±é»»
069\"Æüìʸ»ú¥À¥Ö¥ë¥¯¥©¡¼¥Æ¡¼¥·¥ç¥ó¤ÎÄêµÁ$a = "\"";1.Äê¿ô
070\\Æüìʸ»ú\¥Þ¡¼¥¯¤ÎÄêµÁ$yen = "\\";1.Äê¿ô
071\0Æüìʸ»ú£¸¿Ê¿ô¤ÎÄêµÁ$oct = \0123;1.Äê¿ô
072\dÀµµ¬É½¸½¿ô»ú[0-9]¤ÈÅù²Á¢¨Àµµ¬É½¸½
073\DÀµµ¬É½¸½Èó¿ô»ú¢¨Àµµ¬É½¸½
074\EÆüìʸ»úÂçʸ»ú¾®Ê¸»úÊÑ´¹¤Î½ª¤êprint "\L$text\E" 1.Äê¿ô
075\LÆüìʸ»ú\E ¤¬Íè¤ë¤Þ¤Ç¾®Ê¸»ú¤Ëprint "\L$text\E" 1.Äê¿ô
076\lÆüìʸ»ú¼¡¤Îʸ»ú¤ò¾®Ê¸»ú¤Ë$a = "\lA";1.Äê¿ô
077\nÆüìʸ»ú²þ¹Ô(0A)16print "\n";1.Äê¿ô
078\0Æüìʸ»úʸ»ú¥³¡¼¥É(£¸¿Ê)$A = 0101;1.Äê¿ô
079\rÆüìʸ»úÉüµ¢(0D)16print "\r\n";1.Äê¿ô
080\sÀµµ¬É½¸½¥¿¥ÖŽ¥²þ¹ÔŽ¥Éüµ¢¤Î[\t\n\r\f]¤ÈÅù²Á¢¨Àµµ¬É½¸½
081\SÀµµ¬É½¸½Èó¶õÇòʸ»ú¢¨Àµµ¬É½¸½
082\tÆüìʸ»ú¥¿¥Öprint "name"."\t"."age";1.Äê¿ô
083\UÆüìʸ»ú\E ¤¬Íè¤ë¤Þ¤ÇÂçʸ»ú¤Ë$A = "\U$text$E";1.Äê¿ô
084\uÆüìʸ»ú¼¡¤Îʸ»ú¤òÂçʸ»ú¤Ë$A = "\ua";1.Äê¿ô
085\wÀµµ¬É½¸½±Ñ¿ô»ú[0-9A-Za-z]¤ÈÅù²Á¢¨Àµµ¬É½¸½
086\WÀµµ¬É½¸½Èó±Ñ¿ô»ú¢¨Àµµ¬É½¸½
087\xÆüìʸ»úʸ»ú¥³¡¼¥É(£±£¶¿Ê)$A = \x41;1.Äê¿ô
0880x¿ôÃÍ16¿Ê¿ô0x3af1.Äê¿ô
089e¿ôÃͼ¿ô2.1e3 # 2.1*10*10*101.Äê¿ô
090eqʸ»ú±é»»Ê¸»ú¤¬Åù¤·¤¤$x eq $y5.¾ò·ïŽ¥±é»»»Ò
091geʸ»ú±é»»»Òʸ»ú¤¬Â礭¤¤¤«Åù¤·¤¤$x ge $y5.¾ò·ïŽ¥±é»»»Ò
092gtʸ»ú±é»»»Òʸ»ú¤¬Â礭¤¤$x gt $y5.¾ò·ïŽ¥±é»»»Ò
093leʸ»ú±é»»»Òʸ»ú¤¬¾®¤µ¤¤¤«Åù¤·¤¤$x le $y5.¾ò·ïŽ¥±é»»»Ò
094ltʸ»ú±é»»»Òʸ»ú¤¬¾®¤µ¤¤$x lt $y5.¾ò·ïŽ¥±é»»»Ò
095neʸ»ú±é»»»Òʸ»ú¤¬Åù¤·¤¯¤Ê¤¤$x ne $y5.¾ò·ïŽ¥±é»»»Ò
096xʸ»úÎó±é»»Ê¸»úÎó¤Î³Ý¤±»»$aaa = "a" x 3;3.ÂåÆþŽ¥·ë¹çŽ¥ÇÛÎó



Top