While I was doing the $[ thing, I discovered a bug in a2p's handling of
the match() operator. It uses a comma operator, which has unintended
behaviour in list context (e.g., in a print statement). It also returns
empty string for a non-match, rather than the required 0.
str_cat(str," =~ ");
str_scat(str,fstr=walk(1,level,ops[node+2].ival,&numarg,P_MATCH+1));
str_free(fstr);
- str_cat(str," && ($RLENGTH = length($&), $RSTART = length($`)+1)");
+ str_cat(str," ? scalar($RLENGTH = length($&), $RSTART = length($`)+1) : 0");
numeric = 1;
break;
case OUSERDEF: