The return string contains the intended values, but cyclically permuted with one iteration. Why perl-5.12.3 would cause this, that is the issue here, open for exploration.