in reply to Why won't $' work in a trinary operation?
Add parens to your expression to get the operations to occur in the right manner:($base_string =~ /^#/ ? ($foo = $') : $bar) = $base_string;
$base_string =~ /^#/ ? ($foo = $') : ($bar = $base_string);
|
|---|