Thanks for your help but perhaps I need to be clearer.
If I run that code as is (try it?), art never gets reached. $perm never equals "art", since if it did it would die and print "found art", which is does not. openssl never returns success either, so the system command never returns sucess, so that second die is not triggered either. So the program just keeps printing perms.
BUT if, and only if, I comment out that system call to openssl, art is reached quite quickly, and "found art" gets printed.
If I simply set $perm = "art" before the system command (overriding whatever Algorithm::Permute has set it to), openssl decrypts the test file fine. openssl returns success, the program dies and prints "Found passphrase "art"".
From all of which I conclude that $perm should get passed to openssl fine, but that, for some reason, it doesn't take the passphrase string 'art' if that system line is left in.
You see why I'm puzzled?
Are things happening in other than the order they seem to be?
in reply to Re^3: Need help with Algorithm::Permute and openssl
in thread Need help with Algorithm::Permute and openssl