develooper Front page | perl.perl5.porters | Postings from July 2013

Re: Try/Catch Exception Objects: Possible?

Thread Previous | Thread Next
Tom Christiansen
July 26, 2013 00:27
Re: Try/Catch Exception Objects: Possible?
Message ID:
David Golden <> wrote on Thu, 25 Jul 2013 15:11:19 EDT:

> On Thu, Jul 25, 2013 at 12:36 PM, David E. Wheeler <<SNIP>
>> This works, of course:
>>     if (my $f = 1) {
>>         say $f;
>>     }

>Yes, despite parens, the "my $f" is outside the *block* defined by the braces.

So what?  It's the topic, part of the topicalizer there.  Makes perfect sense.

Just like how

    for $x (@foo) { }

only has $x work inside that block.  It really does make sense this way.
Taking that away was one of perl6's errors.


    PS: For sufficiently liberal notions of work, inside, and block. 

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About