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

(func()){key}?

Thread Next
From:
Michael G Schwern
Date:
July 30, 2003 17:59
Subject:
(func()){key}?
Message ID:
20030731005915.GI2823@windhund.schwern.org
I'm sure this has come up before, but I'm curious.  Why doesn't this DWIM:

    sub foo {
        return( this => 42, that => 23 );
    }
    
    $this = (foo()){42};

Similar to:

    sub foo {
        return(42, 23);
    }

    $this = (foo())[1];


-- 
You're the sickest teenager I've ever set my wallet on.

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About