1. 程式人生 > >perl下Ascii碼和字母的轉換函式:chr() and ord()

perl下Ascii碼和字母的轉換函式:chr() and ord()

數字轉換成字母:

print chr(65)."\n";
print ord(A)."\n";

結果如下:
C:\WINDOWS\system32\cmd.exe /c perl "F:\perl\d.pl"
A
65
Hit any key to close this window...