It allows taint mode, a data flow analysis that prevents potentially dangerous operations using untrusted inputs.
For example, it might seem reasonable to store new user data using
open my $fh, ">", "/var/myservice/$username"
or die "...";
print $fh ...;
To illustrate how useful this is, what if a malicious user gives username ../../../etc/passwdand your service starts as root?
Taint mode will not allow code to run if the value $usernamecomes from the command line or as a CGI form parameter.
perlsec , "" , , .