This does the same thing, and it does not add a Perl 5.10 dependency.