Mailing List Archive

Programming Perl: correction(?) to code
I stand to be corrected, but in the password program I couldn't get
the eval of badpats (middle of p290) to work properly without first
untainting foo. The new code reads:

$foo .= 'return 0}';
$foo =~ /((\n|.)*)/; # rather loose untainting!
eval $1 # Note: this defines sub badpats

This is with 5.001m under Solaris 2.4, in case it's significant.

Sam Sexton
City West, VAM Group Phone: 01203 256562
Reuters Ltd Fax: 01203 555203
Coventry Email: sam.sexton@reuters.com