Actually, the leading zeroes are precisely what are screwing it up. When you use a leading zero in a numeric constant, you're telling perl to use octal. For illumination, try executing this tidbit: perl -e '$n = 009; print "$n\n";' ---scott