Taint::Runtime allows one to turn taint on and off locally (using local $TAINT). Lexical taint checks would make taint a lot easier to use. Unfortunately, when taint is off Perl doesn't set the taint bit on anything, even %ENV. So lexical taint isn't currently very useful. But maybe that could be fixed.