Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re^2: Need help with Algorithm::Permute and openssl

by wdef2 (Acolyte)
on Jan 17, 2008 at 23:21 UTC ( #662976=note: print w/replies, xml ) Need Help??

in reply to Re: Need help with Algorithm::Permute and openssl
in thread Need help with Algorithm::Permute and openssl

'art' is reached every time but only if I comment out the system line. If I leave the system call in, 'art' appears to never be reached. That's the only reason this test is in there (to prove that point):
if ($perm eq "art"){ # If system command is run below, this test is never true. # So system command changes $perm is some way # WTF? print "found $perm \n"; die; }
As for what is happening to $perm to do this (unset, altered in some way) I have no idea - otherwise I would have said so.

Replies are listed 'Best First'.
Re^3: Need help with Algorithm::Permute and openssl
by ikegami (Pope) on Jan 17, 2008 at 23:25 UTC

    No, if anything, that test proves that "art" wasn't reached.

    You have a print just before that if. Do you see it printing "art"? And again, if it does get cleared or corrupted, what does that print print? What's the last thing it prints that isn't corrupted? You already have the debugging statements in place, tell us what they show!

      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?

        So the program just keeps printing perms.

        For the third time, what perms does it print?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://662976]
[rajesh_perl]: thanks for editing it
beech testing firefox 52.0.1
beech me me me me
beech mi
beech eieie
beech .oO( *you* don't exist, I'm only messaging to *me* self),
[beech]: *me
beech oh my *me my*
beech cannot replicate

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2017-03-28 07:10 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (327 votes). Check out past polls.