Have you considered testing for 'cd' in the replacement?
s/,(.*?),/=@{[$1 =~ m|(cd)| && $1 ]}=/
In reply to Re: greedy subexpression between two nongreedy ones
by Anonymous Monk
in thread greedy subexpression between two nongreedy ones
by raygun
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |