From: Jarkko Hietaniemi Date: Thu, 6 Sep 2001 13:30:32 +0000 (+0000) Subject: Update the is_tainted() example implementation. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=61890e451c40f0ead72fe0c321f8242b69768aac;p=p5sagit%2Fp5-mst-13.2.git Update the is_tainted() example implementation. p4raw-id: //depot/perl@11914 --- diff --git a/pod/perlsec.pod b/pod/perlsec.pod index 87d1f7b..e8d44c3 100644 --- a/pod/perlsec.pod +++ b/pod/perlsec.pod @@ -125,10 +125,7 @@ nearby CPAN mirror, and included in Perl starting from the release 5.8.0. Or you may be able to use the following I function. sub is_tainted { - return ! eval { - join('',@_), kill 0; - 1; - }; + return ! eval { eval("#" . substr(join("", @_), 0, 0)); 1 }; } This function makes use of the fact that the presence of tainted data