in reply to Base64 by the (cammel) book

How about replacing $r=~ s/^.(.+)$/$1/; with substr $r, 0, 1, '';? Could be faster, if you need to do a lot of these.