| Next | Tricks of the Wizards | 85 |
...
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/;
}
...
Note that this won't pick up a line like this one:
no Rot13; print "I like pie.\n";
But it will pick this up:
$z = qq{
no Rot13;
};
You just have to hope that nothing like that comes along
In general, source filtering is based on hopes like this one
You can write a filter that works most of the time
But faced with sufficiently weird code, it will break
| Next | ![]() |
Copyright © 2003 M. J. Dominus |