re - Perl pragma to alter regular expression behaviour
($x) = ($^X =~ /^(.*)$/s); # $x is not tainted here use re "taint"; ($x) = ($^X =~ /^(.*)$/s); # $x _is_ tainted here
(We use $^X in these examples because it's tainted by default.)
When use re 'taint' is in effect, and a tainted string is the target of a regex, the regex memories (or values returned by the m// operator in list context) are tainted.
use re 'taint'
This feature is useful when regex operations on tainted data aren't meant to extract safe substrings, but to perform other transformations.
See "Pragmatic Modules" in perlmodlib.
To install re, copy and paste the appropriate command in to your terminal.
cpanm
cpanm re
CPAN shell
perl -MCPAN -e shell install re
For more information on module installation, please visit the detailed CPAN module installation guide.