[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[FWP] Untainting a string



Just wondering what the cleverest/cutest/etc way to untaint a string.  I 
often [almost all of the time actually] verify that a tainted-value is OK 
and can be safely used *WITHOUT* actually doing syntactic matching on the 
string...  and so I also almost all the time just want to say "OK, 
untaint this sucker".  Lately I've been using:

     ($var) = $var =~ /(.*)/ ;

is there some sexier idiom for this kind of thing?

  /Bernie\

-- 
Bernie Cosell                     Fantasy Farm Fibers
mailto:bernie@fantasyfarm.com     Pearisburg, VA
    -->  Too many people, too few sheep  <--          

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe