in reply to initialize ENV variables under strict

krusty said:
"Environment variables taken from your system, not set by you, are tainted. You may need to untaint it first."

This is how i should have phrased my question.
I want to untaint the tainted %ENV.
This untainting would seem like a very common desire among monks.
Anybody know a simple way to do this in perl5.005?
I can always just check each ENV key as suggested earlier.

thanks folks.

  • Comment on Re: initialize ENV variables under strict

Replies are listed 'Best First'.
Re: Re: initialize ENV variables under strict
by chromatic (Archbishop) on Oct 23, 2002 at 18:14 UTC

    There is no simple way to untaint variables. I can't give you an answer that would fit for every program you'll ever want to write under taint mode because I don't know the details of every program. You have to ask, "Exactly what kind of input do I expect here?" and then you can craft a regular expression to match only that type of input.