in reply to rotate a vector with a regex?

s/(.)(?=.)/$2$1/g;
...
... produced 5 warnings and left the string unchanged (I presume the warnings were that $2 was undef)..

Yes, because there is no capture group 2 ((?=.) is a non-capturing look-ahead) and the first capture group is being replaced with itself: $1.