Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: What are these hex character classes?

by three18ti (Scribe)
on Dec 08, 2013 at 01:35 UTC ( #1066170=note: print w/ replies, xml ) Need Help??


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

This is great. Thank you!

So like most things in computing, the zeros are omitted, so \x{A} is actually \x{000A}.


Comment on Re^2: What are these hex character classes?
Replies are listed 'Best First'.
Re^3: What are these hex character classes?
by Kenosis (Priest) on Dec 08, 2013 at 03:14 UTC

    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://1066170]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2015-07-08 06:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls