in reply to use shift function in regex

(Ignoring the plethora of problems with your sample code) you could:

s/^@{[shift]}$/\u$1/ge

True laziness is hard work

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.