Syntactic Confectionery Delight | |
PerlMonks |
Hash to Scalar Assignment Oddityby dsb (Chaplain) |
on Jan 26, 2006 at 15:28 UTC ( [id://525734]=perlquestion: print w/replies, xml ) | Need Help?? |
dsb has asked for the wisdom of the Perl Monks concerning the following question:
A coworker and I were trying to work out some of the code when tie'ing a hash to a Berkeley DB file. I noticed that one of the lines called for the return value from a tie() to be assigned to a scalar variable. So I tried assigning a regular old hash - not a reference to a hash - to a scalar. I didn't get what i expected.
I half expected the code to bomb. Instead the assignment evaluated and when I printed the contents of the scalar, I got a weird result. See the code. Anyone have an idea of what's going on here and why I get a fraction when I print the contents of $db?
dsb This @ISA my( $cool ) %SIG
Back to
Seekers of Perl Wisdom
|
|