(Ignoring the plethora of problems with your sample code) you could:
s/^@{[shift]}$/\u$1/ge
In reply to Re: use shift function in regex
by GrandFather
in thread use shift function in regex
by suhailck
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |