s#^(\w+)/$1_#$1_# should be s#^(\w+)/\1_#$1_#. $1 does not work in the match string, only in the replace string. You have to use \1 in the match string.
In reply to Re: using an RE to consolidate repeated words
by GrandFather
in thread using an RE to consolidate repeated words
by jaa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |