>Can you give an example of such an empty block not being a syntax >error? Hmm, you are right, C<{} my $x;> is also an error. In that case this looks like a bug where the case of an empty block is not handled correctly. Normally in the Perl grammar a block can contain zero or more statements. It is quite legitimate to have C<if (foo) {}> or C<sub bar {}>. Yet somehow when a block appears by itself it has the restriction that it must be non-empty. I think this is a bit fishy; in other C-like languages an empty block can appear in any place where a nonempty one can. Could that become true for Perl too? -- Ed Avis <eda@waniasset.com> ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________Thread Previous | Thread Next