From 61890e451c40f0ead72fe0c321f8242b69768aac Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Thu, 6 Sep 2001 13:30:32 +0000 Subject: [PATCH] Update the is_tainted() example implementation. p4raw-id: //depot/perl@11914 --- pod/perlsec.pod | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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 -- 2.7.4