in reply to How to optimize this code

See if this is better:

my $newblob = join '', map substr( pack( 'N', $_ ), 1 ), $pixellist =~ + /\d+/g;

Update: or maybe this:

( my $newblob = pack 'N*', $pixellist =~ /\d+/g ) =~ s/.(...)/$1/sg;