in reply to sprintf vs. substr (for zero-padded values)

if you're looking for speed (and you know $number is always less than 10 digits), why not do it this way:
sub three { my $number = "213"; my $padded = substr("000000000".$number, -9); #print $padded,"\n"; }
cheers,
Aldo
__END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;