in reply to Re: Align string on a 32-bit boundary with padding
in thread Align string on a 32-bit boundary with padding

I took your suggestion as a challenge. Here is the best I could do. It probably is not what you had in mind.
use strict; use warnings; use Test::More tests=>1; my $Origin_Host_CER="example.me"; my $required = "6578616d706c652e6d650000"; my $length = 4*int((length($Origin_Host_CER)+3)/4); my $result = unpack('H*', pack("Z$length", $Origin_Host_CER)); is($result, $required, 'AVP String');
Bill