in reply to taint when encrypting

My guess based on your error message is that Taint mode is on and you are not untainting $key. If you naively trust the input (I don't know context), you can fix that with:

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

inserted before your $cypher2 declaration. However, if you are running in taint mode, you should likely be less trusting of your input data.

Replies are listed 'Best First'.
Re^2: taint when encrypting
by ww (Archbishop) on Jul 08, 2011 at 23:14 UTC
    BUT, don't do that...

    unless you're the sole user; never make a typo; and can confidently rely on access security.

    Better, read the link that kennethk (++) posted.