http://www.perlmonks.org?node_id=1066179


in reply to Re^2: What are these hex character classes?
in thread [Solved] What are these hex character classes?

You're most welcome, three18ti!

Perl expectedly parses both as "\n" (the leading zeros aren't significant):

perl -MO=Deparse,-p -e 'print "\x{A}"'

Output:

print("\n"); -e syntax OK

And:

use warnings; use strict; print ord "\x{A}" if "\x{000A}" eq "\n";

Output:

10

As you see, \x{A}, \x{000A} and \n all represent the same character.