You see, it's too complex to replace current single-line s/// just to be able to croak() on errors. :(while (1) { $tmpl =~ /\G(...)/gcs && do { if ($1 eq "w") { croak "w is bad"; } else { $result .= process_template($1); } } || $tmpl =~ /\G(...)/gcs && do { ...do.something.else... } || last; }
In reply to Re^2: die in regexp
by powerman
in thread die in regexp
by powerman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |