- evalbytes EXPR
- evalbytes
-
This function is similar to a string eval, except it always parses its argument (or
$_if EXPR is omitted) as a byte string. If the string contains any code points above 255, then it cannot be a byte string, and theevalbyteswill fail with the error stored in$@.この関数は 文字列 eval に似ていますが、引数(EXPR が 省略された場合は
$_) を常にバイト単位のの文字列として 扱います。 文字列に 255 を超える符号位置が含まれている場合、バイト単位文字列に することができないので、evalbytesは失敗し、エラーは$@に保管されます。use utf8andno utf8within the string have their usual effect.文字列中の
use utf8とno utf8は通常の効果を持ちます。Source filters activated within the evaluated code apply to the code itself.
eval されたコード内で有効になったソースフィルタはコード自体に適用されます。
evalbytesis available starting in Perl v5.16. To access it, you must sayCORE::evalbytes, but you can omit theCORE::if the"evalbytes"feature is enabled. This is enabled automatically with ause v5.16(or higher) declaration in the current scope.evalbytesは Perl v5.16 から利用可能です。 これにアクセスするにはCORE::evalbytesとする必要がありますが、"evalbytes"機能 が 有効ならCORE::を省略できます。 これは現在のスコープでuse v5.16(またはそれ以上) 宣言があると 自動的に有効になります。