Path: utzoo!attcan!uunet!wuarchive!psuvax1!news From: flee@guardian.cs.psu.edu (Felix Lee) Newsgroups: comp.lang.perl Subject: Re: Is ; a simple statement? Message-ID: Date: 9 Jul 90 06:18:25 GMT References: <120@array.UUCP> Sender: news@cs.psu.edu (Usenet) Organization: Penn State Computer Science Lines: 23 I thought about it a bit and decided that perl doesn't have null expressions. Consider the following: sub foo { 3; ; } print &foo; If perl had null expressions, then I'd expect &foo to return an undefined value, but instead it returns 3. So I stared at perl's yacc file a bit, and lo, there is no such thing as a null expression. The "null statement" is handled in the rule that says a label can be followed by a semicolon: bar: ; and the label is optional. Adding general null expressions may make perl quite un-yaccable. I think it's enough that you can say 0 while (EXPR); or while (EXPR) {} and even while BLOCK {} -- Felix Lee flee@cs.psu.edu