SV *res;
SV **cvp;
SV *cv, *typesv;
- const char *why1, *why2, *why3;
+ const char *why1 = "", *why2 = "", *why3 = "";
if (!table || !(PL_hints & HINT_LOCALIZE_HH)) {
SV *msg;
PMOP *pm;
char *s = scan_str(start,FALSE,FALSE);
- if (!s)
- Perl_croak(aTHX_ "Search pattern not terminated");
+ if (!s) {
+ char *delimiter = skipspace(start);
+ Perl_croak(aTHX_ *delimiter == '?'
+ ? "Search pattern not terminated or ternary operator parsed as search pattern"
+ : "Search pattern not terminated" );
+ }
pm = (PMOP*)newPMOP(type, 0);
if (PL_multi_open == '?')