Assuming you need to keep characters upto one more than the first occurence of "-"
s/-./$`$&/;
In reply to Re: Replace a hash key if it matches a regex
by ansh batra
in thread Replace a hash key if it matches a regex
by walkingthecow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |