http://www.perlmonks.org?node_id=516693


in reply to What's your favourite method of untainting?

Personally like the method: my ($foo) = $var =~ /^.*$/

It's the "I don't care what was there, but now I'm sure it's safe" untaint method. And it looks more impressive than my $foo = 1.
</tongue_in_cheek>