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.
|
|---|
| 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 |