in reply to Simple Data Cleaning and Verification
The basic way of clearing a variable's taint flag is to apply the m// operator to the variable. The regex you use for the match determines the quality of your untainting.
To wrap the match in a sub, you should use the aliased arguments rather than a copy, so that the taint flag is cleared for the external variable. For example, using the unicode printable test:
sub isPrintable { $_[0] =~ m/^\p(IsPrint)+$/; }
The Regexp::Common module may be useful to you as a library. Email addresses are notoriously difficult.
After Compline,
Zaxo
|
|---|