develooper Front page | perl.perl6.language | Postings from May 2001

Re: Separate "as" keyword? (Re: 'is' and action at a distance)

Thread Previous | Thread Next
From:
Nathan Wiger
Date:
May 18, 2001 13:38
Subject:
Re: Separate "as" keyword? (Re: 'is' and action at a distance)
Message ID:
20010518133455.F6801@west.sun.com
Dammit, I got the example exactly backwards. Try this:

>    $Foo is true;
>    $Foo = 0;
>    print "Stuff" if $Foo;       # *WOULD* print - "is" assigns a
>                                 # permanent "true" property
> 
>    $Foo as true = "";
>    $Foo = 0;
>    print "Stuff" if $Foo;       # *WOULD NOT* print - "as" is reset by
>                                 # value assignment since is temporary


Thread Previous | 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