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

$n was whatever you are adding to the string from your other math. My only point was that appending a short string of "\0" is faster and less to look at than using unpack to split the string on every byte and then re-join them.

Replies are listed 'Best First'.
Re^5: Align string on a 32-bit boundary with padding
by AnomalousMonk (Archbishop) on Aug 21, 2022 at 00:03 UTC

    Fair enough.


    Give a man a fish:  <%-{-{-{-<