[EMAIL PROTECTED] writes:

> On Fri, Apr 12, 2002 at 04:42:07PM +0100, Piers Cawley wrote:
>> [EMAIL PROTECTED] writes:
>> >
>> > Why isn't
>> >
>> >     if %foo {"key"} {print "Hello 1"}
>> >
>> > equivalent with the perl5 syntax:
>> >
>> >     if (%foo) {"key"} {print "Hello 1"}
>> >
>> > Which keyword is it expecting?
>> 
>> Keyword /els(e|if)/, or end of line, or semicolon. Sorry badly phrased
>> on my part. The closing brace of {"key"} only ends the statement if it
>> is followed by /\s*$/, or a semicolon.
>
>
> You've got to be kidding. That makes the whitespace rules even more
> insane; your program can behave quite differently wether there's a
> space, a newline, or nothing between two tokens. Wonderful!  People
> who tend to use -e all the time (like me) will love it. (Not!)
> Pasting code into IRC will be so much more fun.

So use a semicolon. Or disambiguate with parentheses. Or try and
convince Larry that he's wrong about this. Or use the perl5 syntax
rules that will be understood by default.

-- 
Piers

   "It is a truth universally acknowledged that a language in
    possession of a rich syntax must be in need of a rewrite."
         -- Jane Austen?

Reply via email to