Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: What are these hex character classes?

by Kenosis (Priest)
on Dec 08, 2013 at 03:14 UTC ( #1066179=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1066179]
help
Chatterbox?
Lady_Aleena listens to the imaginary crickets.
[Lady_Aleena]: By the way, I'm bored out of my skull at the moment. And it just had to be Friday didn't it?

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2017-01-21 02:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (180 votes). Check out past polls.