The problem is it's using $` which incurs a huge performance penalty.
Here's another OWTDI:
$_ = join "", map { $_ . " " x (8 - length() % 8) } split /\t/, $_, -1;
Update: blakem points out that this code is broken. It will pad all parts of the string to a multiple of 8, including the last one. Getting it not to is disappointingly awkward..
$_ = join "", do {
my @bits = split /\t/, $_, -1;
(map { $_ . " " x (8 - length() % 8) } @bits[0..$#bits-1]), $bits[
+-1]
};
(Update is untested.)
Makeshifts last the longest.