in reply to Is it possible to control scalar(%h) when %h is a tied hash?
update Older perls returned whatever scalar context would return on the underlying hash that got tied. So if you make sure the hash is not empty before tying, the "if" will always be true, and as explained in a node below, the "while" in your code should then work correctly. So if that kind of use of the hash in scalar context is the only kind happening in your program, that should be a good enough workaround.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Is it possible to control scalar(%h) when %h is a tied hash?
by fizbin (Chaplain) on Oct 20, 2004 at 03:22 UTC | |
by BUU (Prior) on Oct 20, 2004 at 04:43 UTC | |
by fizbin (Chaplain) on Oct 20, 2004 at 17:02 UTC | |
|
Re^2: Is it possible to control scalar(%h) when %h is a tied hash?
by fizbin (Chaplain) on Oct 20, 2004 at 17:13 UTC |