Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Five digit number display separately

by choroba (Abbot)
on Sep 04, 2013 at 13:07 UTC ( #1052335=note: print w/ replies, xml ) Need Help??


in reply to Five digit number display separately

Sounds like a homework.

A one liner:

perl -ne 'print $_ x ++$i, " " for split //'

To understand, read print, split, perlvar (explains $_), perlop (explains x, ++, and //), perlsyn (explains for), and perlrun (explains -ne).

لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re: Five digit number display separately
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1052335]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2014-10-24 12:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (131 votes), past polls