Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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

by AnomalousMonk (Canon)
on Oct 10, 2008 at 09:07 UTC ( #716396=note: print w/replies, xml ) Need Help??


in reply to Re^2: Generate the perl sequence 1, 11, 111, ....
in thread Generate the perl sequence 1, 11, 111, ....

... is it possible to write a perl subroutine that does the same thing, myPerlSub BLOCK LIST
Absolutely. See perlsub and in particular Prototypes.
>perl -wMstrict -le "sub mysub (&@) { my $coderef = shift; map $coderef->($_), @_; } my @out = mysub { $_ += 33 } 0 .. 5; print qq{@out}; " 33 34 35 36 37 38

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://716396]
help
Chatterbox?
[Corion]: 1nickt: I bought a 2015 XPS 13, which is a very nice and shiney (and somewhat overpriced) machine, but I think it's still better priced than an Apple machine. Now it just has to hold up 10 years like the old one did ;)
[1nickt]: Ah, you got Linus' fave? With Ubuntu? 4k display?
[1nickt]: ( The 17" monster I just bought is for my wife, who doesn;t leave the house with it...)

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (9)
As of 2017-03-27 13:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (320 votes). Check out past polls.