Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: How many loops are there in Perl?

by repellent (Priest)
on Jan 31, 2012 at 08:32 UTC ( #950905=note: print w/replies, xml ) Need Help??


in reply to How many loops are there in Perl?

[1 .. 5] ~~ sub { say "Inside loop $_[0]?" }; # Perl 5.10.1+

Replies are listed 'Best First'.
Re^2: How many loops are there in Perl?
by davido (Archbishop) on Jan 31, 2012 at 18:51 UTC

    That's one for the obfu-toolkit. I'm surprised we haven't seen abuse of the regex engine and (?{...}) blocks.


    Dave

      as you wish :)

      DB<72> (" "x10) =~ m/ (?{print $x++})/g => (" ", " ", " ", " ", " ", " ", " ", " ", " ", " ") 0123456789

      I'm surprised nobody tried s///e

      Cheers Rolf

      update:

      DB<20> $_=" "x10; s/ /print $x++/ge => 10 0123456789

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://950905]
help
Chatterbox?
[karlgoethebier]: ... the ultimate coding experience for everyday people...
[karlgoethebier]: ...like me
[marto]: what a mess
[karlgoethebier]: perhaps i need a zerial?
[Corion]: marto: Heh - I think that's a nice contractual trap, "you will not use other gods/engines besides ours" ;)
[Corion]: But if the base intention was to have CIG as "co-developers" who (have to) contribute changes back to the mainline, it makes sense to have them use no other engine
[marto]: yes, I hear that development house has been on its last legs for a couple of years now
[Corion]: Is anybody aware of what makes Android Oreo better than Android Nougat? I'm not sure if the architectural changes (etc) are there already that make upgrading an Oreo-kernel phone to a newer Android userland (Lineage OS) version feasible
[Corion]: Yeah, CryTek got blindsided (or whatever) by Unity and Unreal Engine being zero cost, and the CryTek documentation being bad/nonexistent I think
[Corion]: "zero monetary cost", because of course, it's gratis only if your time has no value :)

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2017-12-14 10:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (389 votes). Check out past polls.

    Notices?