Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Align string on a 32-bit boundary with padding

by BillKSmith (Monsignor)
on Aug 18, 2022 at 16:13 UTC ( [id://11146231]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11146231]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2025-12-17 04:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (98 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.