substr substr(do { _utf8_off(my $internal = $_); $internal }, 0, 4) . chr(0) x 4, 0, 4;