```{index} single: tainted (Scalar::Util) ``` ```{index} single: Scalar::Util::tainted ``` # tainted `tainted($var)` - returns true if `$var` is tainted. Under taint mode (`-T`) everything that comes from outside the program is tainted: `%ENV`, `@ARGV`, `$0`, data read from files, and any value derived from them. Constants and values computed only from constants are not. Outside taint mode nothing is tainted, so this always returns false. Takes exactly one argument. $taint = tainted("constant"); # false $taint = tainted($ENV{PWD}); # true if running under -T