Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Something strange in the world or Regexes

by mrguy123 (Hermit)
on Sep 30, 2009 at 09:56 UTC ( [id://798267]=note: print w/replies, xml ) Need Help??


in reply to Re: Something strange in the world or Regexes
in thread Something strange in the world or Regexes

It makes sense that by copying and pasting the code I got rid of the "non core" character. Can you explain what you did with the "hex dumper"?
Thanks, mrguy
  • Comment on Re^2: Something strange in the world or Regexes

Replies are listed 'Best First'.
Re^3: Something strange in the world or Regexes
by Corion (Patriarch) on Sep 30, 2009 at 10:04 UTC

    Something I find quite helpful with one liners is B::Deparse:

    >perl -MO=Deparse -lne "printf qq([%s] => %02x\n), $_, ord $_ for spli +t //" BEGIN { $/ = "\n"; $\ = "\n"; } LINE: while (defined($_ = <ARGV>)) { chomp $_; printf "[%s] => %02x\n", $_, ord $_ foreach (split(//, $_, 0)); }

    So that program goes through the input, splits it between each byte, and then feeds each byte as a character and as the number to the printf function.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://798267]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-19 23:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found