Due to my own syntax bug, what essentially happened was ...
cat p.pl; echo ; perl -Dr p.pl printf "matched: %s\n" , ( 'x' =~ undef() ? 'yes' : 'no' ) ; Omitting $` $& $' support. EXECUTING... Compiling REx "" Final program: 1: NOTHING (2) 2: END (0) minlen 0 Matching REx "" against "x" 0 <> <x> | 1:NOTHING(2) 0 <> <x> | 2:END(0) Match successful! matched: yes Freeing REx: ""
Is there a way to turn a *match attempt against an undef variable* to be deadly at run time? (I am well aware of the warning generated when matching against an undef value. By that warning itself I had located the error of my ways.)
In reply to Turn matching against undef to be deadly by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |