As stated here Numeric Conversions perl doesn't not convert a binary number stored in a string to an integer automatically
chr function expects a number and as said before Perl doesn't do it automatically and it fails, on the other hand oct function expects an expression and if it is an string and it starts with 0b will interpret it as binary number and will return the corresponding integer.
In reply to Re: what is difference between chr and oct?
by bluescreen
in thread what is difference between chr and oct?
by xiaoyafeng
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |