in reply to ?: conditional operators appear to fail
didn't work quite as expected. After a bit'o head scratching about no results and complaints about "void context", I remembered the nastiness pointed out about 'print' and others, and realized the left paren was confusing the parser into thinking "warn()".warn ($msg =~ m/\n$/) ? $msg : ($msg . "\n");
In _this_ case, removing the parens worked better...
warn $msg =~ m/\n$/ ? $msg : ($msg . "\n");
|
|---|