in reply to Untainting known good data
use IO::Handle; # ... F->untaint == 0 or die "Untainting filehandle failed: $!\n"; # ...
As the IO::Handle's docs say, this is a very trusting action to take and should only be done if you can really trust what you are untainting.
You could, of course, take another route of actually untainting the $tmpl variable:
($tmpl) = $tmpl =~ /(.*)/s;
|
|---|