use encoding "iso 8859-7";
+ # The \xDF of ISO 8859-7 is \x{3af} in Unicode.
+
$a = "\xDF";
$b = "\x{100}";
+ printf "%#x\n", ord($a); # will print 0x3af, not 0xdf
+
$c = $a . $b;
# $c will be "\x{3af}\x{100}", not "\x{df}\x{100}".
- # The \xDF of ISO 8859-7 is \x{3af} in Unicode.
=head1 DESCRIPTION
The pragma is a per script, not a per block lexical. Only the last
C<use encoding> matters, and it affects B<the whole script>.
+If no encoding is specified, the environment variable L<PERL_ENCODING>
+is consulted. If no encoding can be found, C<Unknown encoding '...'>
+error will be thrown.
+
=head1 FUTURE POSSIBILITIES
The C<\x..> and C<\0...> in regular expressions are not
=head1 SEE ALSO
-L<perlunicode>
+L<perlunicode>, L<encode>
=cut