my @bytes = unpack "C*", $a; #### my $result = pack "C*", @newbytes;