| Next | Tricks of the Wizards | 84 |
The previous version supports ab Ebg13; but not no Rot13;
For that we have to be a little more devious:
...
if ($status >= 0) {
if (/^\s* no \s+ Rot13 \s* ; # "no Rot13;"
\s* (?: #.* )? $ # Optional WS or comment
/x) {
return $status;
}
tr/A-Za-z/N-ZA-Mn-za-m/;
}
...
We examine the line for no Rot13; before we give it to the compiler
If so, we return the line without rot13ing it
We could also have called filter_del() directly
Filter::Simple does this automatically
| Next | ![]() |
Copyright © 2003 M. J. Dominus |