Perl 程式設計/關鍵字/ord
外觀
ord返回與表示式關聯的數字。如果表示式是空字串,則函式返回 0。如果沒有數字,則使用$_的內容。
ord是 chr 的反向操作。
ord EXPRESSION
ord
| 上一個:or | 關鍵字 | 下一個:our |
ord返回與表示式關聯的數字。如果表示式是空字串,則函式返回 0。如果沒有數字,則使用$_的內容。
ord是 chr 的反向操作。
ord EXPRESSION
ord
#!"C:/Programms/Perl/site/bin"
use 5.10.0;
$character = 'A';
say "character = '" . $character, "' corresponds to the value of " . ord $character;
number = 65 corresponds to the code 'A' character = 'A' corresponds to the value of 65
| 上一個:or | 關鍵字 | 下一個:our |