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.