You are viewing the version of this documentation from Perl 5.39.1. This is a development version of Perl.
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 the evalbytes will fail with the error stored in $@.

use utf8 and no utf8 within the string have their usual effect.

Source filters activated within the evaluated code apply to the code itself.

evalbytes is available starting in Perl v5.16. To access it, you must say CORE::evalbytes, but you can omit the CORE:: if the "evalbytes" feature is enabled. This is enabled automatically with a use v5.16 (or higher) declaration in the current scope.