in reply to Laundering tainted 'eval'

Taint won't let you feed data from a filehandle directly into an eval because that filehandle could feed you anything, including something terribly destructive. You have to read the file contents into a scalar and untaint it before it can be evaled, like so:
#!/usr/bin/perl -wT use strict; open (DATA, "<foo.txt") || die; while (my $dataline = <DATA>) { $dataline =~ /(print '[^']*';)/ || next; eval $1; print "\n"; }