in reply to Re^4: ' or no?
in thread ' or no?
? because oct function require a "string" parameter,So perl convert(stealthily) 0xff(number) to 255(string),then oct convert 255(octal) to 173(decimal). right?I hopefully don't misunderstand reply being provided.print oct(0xff); # 173
p.s. maybe I can use pack,but it's another issue.my $num = 0xff; print oct($num); #wrong! printf('xo',$num);# right!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: ' or no?
by ikegami (Patriarch) on Dec 28, 2006 at 18:07 UTC |