in reply to Re: rotate a vector with a regex?
in thread rotate a vector with a regex?
local $_ = '12345'; while( /(?=..)/g ) { my $pos = pos(); s/\G(.)(.)/$2$1/; pos() = $pos + length($2); } print $_, $/ __END__ 23451
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: rotate a vector with a regex? (//g, s/\G)
by remiah (Hermit) on Nov 22, 2012 at 10:15 UTC |