Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: How many loops are there in Perl?

by LanX (Canon)
on Feb 01, 2012 at 23:04 UTC ( #951312=note: print w/ replies, xml ) Need Help??


in reply to Re^2: How many loops are there in Perl?
in thread How many loops are there in Perl?

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


Comment on Re^3: How many loops are there in Perl?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (17)
As of 2015-07-02 17:57 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 (44 votes), past polls