in reply to Re: Basic transformations
in thread Basic transformations

Use the pack template 'C*' instead of 'c*'. The latter only handles byte values up to 127, the former handles up to 255.

Replies are listed 'Best First'.
Re^3: Basic transformations
by BrowserUk (Patriarch) on Nov 30, 2010 at 01:41 UTC

    By the way, you could speed up your processing of that data enormously by skipping the split multiple maps over hex and chr et al. by using:

    $s = '48 65 6c 6c 6f 2c 20 77 6f 72 6c 64 21';; $s =~ tr[ ][]d; print pack 'H*', $s;; Hello, world!
Re^3: Basic transformations
by Anonymous Monk on Nov 30, 2010 at 01:41 UTC
    Thanks. I don't know how I missed that.