SU
Size: a a a
SU
SU
perldoc perlfunc
даст ответ на вопросSU
IB
perl -e 'my @x = (1); my $i = int(rand * @x);'
Warning: Use of "rand" without parentheses is ambiguous at -e line 1.
syntax error at -e line 1, near "x)"
Execution of -e aborted due to compilation errors.
IB
SU
perl -e 'my @x = (1); my $i = int(rand * @x);'
Warning: Use of "rand" without parentheses is ambiguous at -e line 1.
syntax error at -e line 1, near "x)"
Execution of -e aborted due to compilation errors.
perl -Mdiagnostics -e 'my @x = (1); my $i = int(rand * @x);'
, оно подробно расскажетMD
SU
unicode_strings
feature, которую подключает use 5.26.0: https://perldoc.perl.org/5.30.0/feature.html#The-'unicode_strings'-featureuse feature 'unicode_strings' tells the compiler to use Unicode rules in all string operations executed within its scope (unless they are also within the scope of either use locale or use bytes ). The same applies to all regular expressions compiled within the scope, even if executed outside it. It does not change the internal representation of strings, but only how they are interpreted.
SU
unicode_strings
feature, которую подключает use 5.26.0: https://perldoc.perl.org/5.30.0/feature.html#The-'unicode_strings'-featureuse feature 'unicode_strings' tells the compiler to use Unicode rules in all string operations executed within its scope (unless they are also within the scope of either use locale or use bytes ). The same applies to all regular expressions compiled within the scope, even if executed outside it. It does not change the internal representation of strings, but only how they are interpreted.
MD
AP
MD
AP
SU
no feature 'unicode_strings'
?MD
MD
AP
AP
$ perl -MEncode -E '$a="поимел"; $a8 = encode("UTF-8", $a); $a88 = encode("UTF-8", $a8); $b88 = decode("UTF-8", $a88); $b8 = decode("UTF-8", $b88); say $b88; say $b8'
поимел
поимел
AP
п
— похожая частьAP
$ perl -MEncode -E '$a="пÑ\u0080имеÑ\u0080"; say decode("UTF-8", $a)'
п�0080име�0080