Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Welcome to the Monastery
 
PerlMonks  

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

by blazar (Canon)
on Oct 11, 2008 at 10:10 UTC ( #716580=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    map (sub { "1" x $_ }, (1..10));
    
  2. or download this
    C:\temp>perl -E "say for map sub {1 x $_} => 1..3"
    CODE(0x182a944)
    CODE(0x182a944)
    CODE(0x182a944)
    
  3. or download this
    C:\temp>perl -E "say for map { my $x=$_; sub {1 x $x} } 1..3"
    CODE(0x23aa7c)
    CODE(0x182aef4)
    CODE(0x182ad74)
    
  4. or download this
    C:\temp>perl -E "my $_; say for map sub {1 x $_} => 1..3"
    CODE(0x23a97c)
    CODE(0x182a9bc)
    CODE(0x183bbbc)
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2014-04-17 22:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (458 votes), past polls