Are you interested in the end product or do you want all intermediates?
in reply to rotate a vector with a regex?
This will give you the end product:
use feature 'say';
my $string = "12345";
$string = substr( $string, 1 ) . substr( $string, 0, 1 );
EDIT: Just realized you were asking for something else. Oops. I think AnomalousMonk is correct about it not being possible this way. Regarding the errors, you need to specify the second capture group since the second set of parentheses you have are part of the lookahead. This gets rid of the warnings:
$ perl -WE '$string = "12345"; $string =~ s/(.)(?=(.))/$2$1/g; say $st