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?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||