Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Five digit number display separately

by choroba (Canon)
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 perusing the Monastery: (11)
As of 2015-01-28 09:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My top resolution in 2015 is:

















    Results (213 votes), past polls