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

Re^2: rotate a vector with a regex?

by LanX (Canon)
on Nov 21, 2012 at 17:29 UTC ( #1004972=note: print w/ replies, xml ) Need Help??


in reply to Re: rotate a vector with a regex?
in thread rotate a vector with a regex?

> rather, an intermediate string is being built up during this process, and the intermediate string is copied to the original string

I think you're right

DB<123> $x=join "",a..j => "abcdefghij" DB<124> $x =~ s/(.)(?=(.))/$2$1/g => 9 DB<125> $x => "bacbdcedfegfhgihjij"

Cheers Rolf


Comment on Re^2: rotate a vector with a regex?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2015-07-03 22:52 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 (57 votes), past polls