$bits =~ s/(.)/~$1/ges; [download]
In reply to Re: In-place bitwise NOT? by choroba in thread In-place bitwise NOT? by BrowserUk