Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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


Comment on Re: Generate the perl sequence 1, 11, 111, ....
Select or Download Code
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2014-09-19 21:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (147 votes), past polls