in reply to Re: Taint problem opening file to write
in thread Taint problem opening file to write

Here is where i recommend the 3-arg form of open. From the docs:

Use 3-argument form to open a file with arbitrary weird characters in it,

open(FILE, '<', $file);
otherwise it's necessary to protect any leading and trailing whitespace:
$file =~ s#^(\s)#./$1#; open(FOO, "< $file\0");

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)