in reply to How to separate digits
for (my $int = 1; $int <= 999999999999; $int++) { my $leading = sprintf("%012d", $int); my @split = ($leading =~ /../g); print join(':', @split) . "\n"; print join('.', @split) . "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to separate digits
by imperl (Novice) on May 24, 2005 at 09:25 UTC |