in reply to Problems with zero filling a number.

Very, very strange. Are you sure that you did a printf? Not that your code is correct as others have pointed out, but it shouldn't write %09d213 either. I've tried it on all versions of Perl released since 5.000, and they all print 000000000213. From 5.7.1 onwards, it will print a warning as well.

Abigail