diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-09-06 13:30:32 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-09-06 13:30:32 +0000 |
commit | 61890e451c40f0ead72fe0c321f8242b69768aac (patch) | |
tree | feaa99434f88734473f426e0341274a685fca4bd /pod/perlsec.pod | |
parent | cb26d8ba64232f03b2fd70f760cb5b474500f681 (diff) | |
download | perl-61890e451c40f0ead72fe0c321f8242b69768aac.tar.gz |
Update the is_tainted() example implementation.
p4raw-id: //depot/perl@11914
Diffstat (limited to 'pod/perlsec.pod')
-rw-r--r-- | pod/perlsec.pod | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/pod/perlsec.pod b/pod/perlsec.pod index 87d1f7b340..e8d44c3556 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<is_tainted()> 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 |