If anyone wants some quick rep here you go :).
How can I add character litterals like I can do in C. For example
print 'A' + 1
The above should print ‘B’ since ASCII ‘A’ + 1 gives ASCII ‘B’
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
chr(ord('A') + 1). Perl doesn’t have a character type, it has a string type. And a string doesn’t behave numerically as an ASCII value. You wantordto convert it to a numeric codepoint andchrto convert it back.