in reply to Having problems with unlink and taint mode.
Assuming success won't help -- if it fails, either the taint will persist or you'll get the results of the first capture from the last successful match.if ($file =~ /^([-\w.]+$/) { $file = $1; } else { print "Couldn't untaint \$file!\n"; }
(I had to look up the behavior of '.' within a character class, 'cuz I so rarely use it.)
|
|---|