in reply to Is { } an empty block or a bug in perl?
Would {}{} be
1) a block followed by a hash constructor,
2) a hash constructor followed by a block,
3) a hash constructor followed by a hash constructor, or
4) a block followed by a block?
They are not equivalent. At least, they are not equivalent if found at the end of a sub. The syntax error forces the user to disambiguate.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Is { } an empty block or a bug in perl?
by Joost (Canon) on Jul 06, 2005 at 19:32 UTC |