Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Generate the perl sequence 1, 11, 111, ....

by Skeeve (Vicar)
on Oct 10, 2008 at 08:39 UTC ( #716393=note: print w/replies, xml ) Need Help??


in reply to Generate the perl sequence 1, 11, 111, ....

For the fun of it:

perl -e 's/$/$\//;print while s/$/1/'

s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e

Replies are listed 'Best First'.
Re^2: Generate the perl sequence 1, 11, 111, ....
by jwkrahn (Monsignor) on Oct 10, 2008 at 10:14 UTC

    Or more simply:

    perl -le'print while s/$/1/'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://716393]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2016-12-11 10:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (169 votes). Check out past polls.