Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
[5.8.0 Note] use Taint or dieby rob_au (Abbot) |
on Nov 29, 2002 at 11:44 UTC ( [id://216503]=perlmeditation: print w/replies, xml ) | Need Help?? |
With Perl 5.8.0, a new special variable has been introduced, ${^TAINT}, which indicates whether taint mode is enabled - See perldelta. The following little block of code has been written to show how this variable may be of used to ensure the application of taint mode with code which may accept potentially dangerous input from outside of the codebase. Moreover, I wanted to write a piece of code that mandated the requirement of taint mode where the lexical term 'use Taint' was employed. Subsequently, I wasn't sure if this post rightly belonged in Meditations or Poetry :-)
And in usage ...
perl -e 'print+unpack("N",pack("B32","00000000000000000000000111101101")),"\n"'
Back to
Meditations
|
|