Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: regex/perl golf: loops

by Ratazong (Prior)
on Apr 26, 2012 at 06:42 UTC ( #967247=note: print w/ replies, xml ) Need Help??


in reply to regex/perl golf: loops

No recursive solution till now?! This has to be changed (for the sake of TIMTOWTDI, not golfing):

perlmonksrule(9); sub perlmonksrule { if ($_[0]) { perlmonksrule($_[0]-1); } $_ = (caller(0))[3]; s/sr/s r/; print /::(.*)$/,"!\n"; }

update: a more compact version here (without the usage of the function-name):

$a=9;a();sub a{a()if($a--);print"perlmonks rule!\n";}


Comment on Re: regex/perl golf: loops
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (12)
As of 2015-07-30 12:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (271 votes), past polls