"Chas Owens" <[EMAIL PROTECTED]> writes:
> sprintf is definitly the correct answer, but just to prove TIMTOWTDI
>
> #!/usr/bin/perl
>
> use strict;
>
> print zeropad(5,100), "\n";
>
> sub zeropad {
>         my ($count, $n)  = @_;
>         return substr '0' x $count . $n, -$count;
> }

I probably wasn't clear enough in my request...
This ouputs:

   ./test.pl
  00100

I'm after:
  001 thru 999 and then 1000


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to