16章 ビット

  • perldoc -f oct で,"0x", "0b" が渡せるのは覚えてなかった

oct EXPR
oct Interprets EXPR as an octal string and returns the
corresponding value. (If EXPR happens to start off with "0x",
interprets it as a hex string. If EXPR starts off with "0b",
it is interpreted as a binary string. Leading whitespace is
ignored in all three cases.) The following will handle
decimal, binary, octal, and hex in the standard Perl or C
notation:

  • vec は,使うときに読めば良いかなと思っていつもスルー