Taint

Learn about taint, the sticky piece of metadata that comes from outside our programs.

Some Perl features can help us write secure programs. These tools are no substitute for careful thought and planning, but they reward caution and understanding and can help us avoid subtle mistakes.

Taint mode (or taint) is a sticky piece of metadata attached to all data that comes from outside our program. Any data derived from tainted data is also tainted. We may use tainted data within our program, but if we use it to affect the outside world—if we use it insecurely—Perl will throw a fatal
exception.

Get hands-on with 1200+ tech skills courses.