in reply to eq evaluates a variable as equal to two different strings

Can't reproduce your results. Your code is incomplete (no population of %info or $key), so I had to mock up that bit:

$key = 'fred'; $info{$key} = 'false'; $baz = $info{$key}; printf "[%s] [%s] [%d] [%d] [%d]\n", $baz, unpack('H*', $baz), $baz eq 'true', $baz eq 'false', $baz eq 'default';; [false] [66616c7365] [0] [1] [0]

Looks like you should post a complete, runnable example that reproduces your problem.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked

Replies are listed 'Best First'.
Re^2: eq evaluates a variable as equal to two different strings
by landru27 (Initiate) on Jan 30, 2015 at 21:37 UTC

    Thanks for taking a look. I did note (see my 2nd sentence of my original post) that I, also, cannot reproduce the problem. It's only occurring in situ. So, it's more a question of whether or not anyone has run into the same or similar issue, and what they discovered about it.

    I'm also happy to provide the original program where the problem is occurring, but at 20k it seemed a bit long to post unsolicited; also, there are external conditions for running it, such as interacting with a active AWS/EC2 account. But anyone as curious about this as I am can just ask, and I'll share the full program where the problem manifests.