in reply to warnings under the debugger
In the first case () is in scalar context so is a pair of empty brackets, not the empty list you may have been expecting. There is no error because => is really just a comma that implictly quotes the bare word to the left. The anon hash is thus the equivelent of {'foo', }. (See List value constructors and Comma Operator.)
Why you get different behaviour in the debugger I don't know however.
Update: strike bogus scalar context comment - see reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: warnings under the debugger
by Anno (Deacon) on Mar 08, 2007 at 09:31 UTC |