s/// replaces everything that matched on the left with whatever matched on the right. What you want to do is store which one of
[c|d] matched, and then put that back into the match, ala
$bleh="-a 123 -b 456 -c 789 -d 333";
$bleh=~s/-([bc])/-:$1/g;
print $bleh;
The
$1 evaluates to whatever
([bc]) matched (either b or c) and then replaces everything matched on the left with whatever is appropriate on the right.