Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: What are these hex character classes?

by Kenosis (Priest)
on Dec 08, 2013 at 00:37 UTC ( [id://1066167]=note: print w/replies, xml ) Need Help??


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

From Prelre:

\x{}, \x00 character whose ordinal is the given hexadecimal number

The \x denotes the beginning of a hexadecimal value.

Also see: Unicode character table.

Replies are listed 'Best First'.
Re^2: What are these hex character classes?
by three18ti (Monk) on Dec 08, 2013 at 01:35 UTC
    This is great. Thank you!

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

      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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1066167]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-24 02:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found