That's because $1 is not defined, since your regexp is not capturing anything; you need parentheses for that. Try this:
if ($lastname =~ /^([\s\w.'-]+)$/ && length($lastname) < 28) +{ $lastname = $1; # $data now untain +ted
the lowliest monk
In reply to Re: taint problem
by tlm
in thread taint problem
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |