Perl¤ÎÀâÌÀ¡¡¡¡¡¡¡¡¡¡ 1.ʸ»ú¡¡¡¡ 2.¿ôÃÍ¡¡¡¡ 3.¥¨¥¹¥±¡¼¥×ʸ»ú¡¡¡¡ 4.¥Ò¥¢Ê¸»úÎó

¡¡£±. Perl ¤ÎÄê¿ô¤Ë¤Ä¤¤¤ÆÀâÌÀ¤·¤Þ¤¹¡£



¡¡1.ʸ»ú
¥·¥ó¥°¥ë¥¯¥©¡¼¥Æ¡¼¥·¥ç¥óËô¤Ï¥À¥Ö¥ë¥¯¥©¡¼¥Æ¡¼¥·¥ç¥ó¤Ç°Ï¤à
ÄêµÁÆâÍÆ¥·¥ó¥°¥ë¤Î¾ì¹ç¥À¥Ö¥ë¤Î¾ì¹ç
'Hello !' 123 can't open '\'Hello !\'' '123' 'can\'t open' "'Hello !'" "123" "can't open"
"multi" \1,000 Hello !\n '"multi"' '\\1,000' 'Hello !\n' "\"multi\"" "\\1,000" "Hello \!\\n"
Msg = $data 'Msg = $data' "Msg = \$data"
¡¦¥·¥ó¥°¥ë¥¯¥©¡¼¥Æ¡¼¥·¥ç¥ó¤Ç ' ¤ÎÄêµÁ¤Ï \ ¤ò¤Ä¤±¤Æ¶èÊ̤·¤Þ¤¹¡£
¡¦¥À¥Ö¥ë¥¯¥©¡¼¥Æ¡¼¥·¥ç¥ó¤Ç¡¡ " ¤ÎÄêµÁ¤Ï \ ¤ò¤Ä¤±¤Æ¶èÊ̤·¤Þ¤¹¡£

¡¦\ ¤òʸ»úÎóÃæ¤Ëµ­½Ò¤¹¤ë¤È¤­¤Ï¡¢\\ ¤È¤·¤Þ¤¹¡£
¡¦¥À¥Ö¥ë¥¯¥©¡¼¥Æ¡¼¥·¥ç¥ó¤ÇÊÑ¿ô(¥¹¥«¥é¡¼Ž¤ÇÛÎóŽ¤Ï¢ÁÛÇÛÎó)¤Ï¡¢ÊÑ¿ô¤ÎÆâÍƤˤʤë¤Î¤Ç¡¢¤³¤ì¤â \ ¤ò¤Ä¤±¤Þ¤¹¡£¥·¥ó¥°¥ë¥¯¥©¡¼¥Æ¡¼¥·¥ç¥ó¤ò»È¤¨¤ÐŸ³«¤·¤Þ¤»¤ó¡£

¢¨\ ¤òʸ»úÎóÃæ¤Ëµ­½Ò¤·¤¿¾ì¹ç¤Ï¡¤ \ ¤Îľ¸å¤Îʸ»ú¤Ë¤è¤Ã¤ÆÆÃÊ̤ʰÕÌ£¤ò»ý¤Á¡¢¥¨¥¹¥±¡¼¥×ʸ»ú¤È¤¤¤¤¤Þ¤¹¡£



¡¡2.¿ôÃÍ
µ­½Ò¡¡Îã
10¿Ê¿ô 8¿Ê¿ô(Ƭ¤Ë0¤òȼ¤¦) 16¿Ê¿ô(Ƭ¤Ë0x¤òȼ¤¦) ¼Â¿ô 12345, -123, +12 0123, 0456 0xa1, 0x2ff, -0x3f 2.15e7, 2.15E7, -2.15e-5, 3.14e43




¡¡3.¥¨¥¹¥±¡¼¥×(Æüì)ʸ»ú

\ ¤òʸ»úÎóÃæ¤Ëµ­½Ò¤·¤¿¾ì¹ç¤Ï¡¤ \ ¤Îľ¸å¤Îʸ»ú¤Ë¤è¤Ã¤ÆÆÃÊ̤ʰÕÌ£¤ò»ý¤Á¡¢¥¨¥¹¥±¡¼¥×ʸ»ú¤È¤¤¤¤¤Þ¤¹¡£¥·¥ó¥°¥ë¥¯¥©¡¼¥Æ¡¼¥·¥ç¥ó¤Ç¤Ï \' \\ ¤Î¤ß»ÈÍѤǤ­¤Þ¤¹¡£¥À¥Ö¥ë¥¯¥©¡¼¥Æ¡¼¥·¥ç¥óÆâ¤Ç¤Ï¡¢ÍÍ¡¹¤ÊÆüìʸ»ú¤¬¤¢¤ê¤Þ¤¹¡£

¥·¥ó¥°¥ë¥¯¥©¡¼¥Æ¡¼¥·¥ç¥ó¤Ç»ÈÍѤǤ­¤ëÆüìʸ»ú
\' \\ ¥·¥ó¥°¥ë¥¯¥©¡¼¥Æ¡¼¥·¥ç¥ó \¥Þ¡¼¥¯
¥À¥Ö¥ë¥¯¥©¡¼¥Æ¡¼¥·¥ç¥ó¤Ç»ÈÍѤǤ­¤ëÆüìʸ»ú(°ìÉô)
\" \\ \n \r \t \x123 \0123 \l \u \L \U \E ¥À¥Ö¥ë¥¯¥©¡¼¥Æ¡¼¥·¥ç¥ó \¥Þ¡¼¥¯ ²þ¹Ô(0A)16 Éüµ¢(0D)16 ¥¿¥Ö ʸ»ú¥³¡¼¥É(£±£¶¿Ê) \x41 ¤Ï(41)16¡¡¡¡¡¡¡¡¡¡Ê¸»úA ʸ»ú¥³¡¼¥É(¡¡£¸¿Ê) \0101 ¤Ï(101)8 = (41)16 ʸ»úA ¼¡¤Îʸ»ú¤ò¾®Ê¸»ú¤Ë ¼¡¤Îʸ»ú¤òÂçʸ»ú¤Ë \E ¤¬Íè¤ë¤Þ¤Ç¾®Ê¸»ú¤Ë \E ¤¬Íè¤ë¤Þ¤ÇÂçʸ»ú¤Ë Âçʸ»ú¾®Ê¸»úÊÑ´¹¤Î½ª¤ê

¡¦Îã¡¡print "\LAbCd\E" . "\n";¡¡¢ª¡¡abcd
¡¦Îã¡¡print "\L$text\E" . "\n";¡¡¢ª¡¡$text = 'AbCd' ¤Ê¤é¡¡abcd



¡¡4.¥Ò¥¢Ê¸»úÎó

here-is µ­Ë¡¤Î¤³¤È¤Ç¤¢¤ê¡¢»ØÄꤷ¤¿Ê¸»úÎ󤬸½¤ì¤ë¤Þ¤Ç¡¢¹Ô¤ÎÃͤòÊÑ¿ô¤ËÂåÆþ¤·¤Þ¤¹¡£²þ¹Ô¤·¤Æ¤¢¤ì¤Ð¡¢¤â¤Á¤í¤ó²þ¹Ô¤â´Þ¤Þ¤ì¤Þ¤¹¡£

$text = <<EOF; # ʸ»úÎó"EOF"¤Î¤¢¤ë¹Ô¤Þ¤Ç¤ÎÃͤ¬$text¤ËÂåÆþ¤µ¤ì¤ë <html> <head><title>html text</title></head> <body> : </body> EOF




1.ʸ»ú¡¡¡¡ 2.¿ôÃÍ¡¡¡¡ 3.¥¨¥¹¥±¡¼¥×ʸ»ú¡¡¡¡ 4.¥Ò¥¢Ê¸»úÎó¡¡¡¡¡¡¡¡ [ Top ]