in reply to Five digit number display separately
A one liner:
perl -ne 'print $_ x ++$i, " " for split //' [download]
To understand, read print, split, perlvar (explains $_), perlop (explains x, ++, and //), perlsyn (explains for), and perlrun (explains -ne).