develooper Front page | perl.fwp | Postings from February 2005

Re: "Secret" operators

Thread Previous | Thread Next
From:
José Castro
Date:
February 2, 2005 02:17
Subject:
Re: "Secret" operators
Message ID:
20050202101740.GA8808@natura.di.uminho.pt
* Andrew Savige (ajsavige@yahoo.com.au) wrote:
> Not that it is seen very often, but you might try dreaming up a
> name for:
> 
>     ]->[
> 
> I first saw this operator employed in a graceful way to return the
> lesser of $x and $y:

Or the greater, if used like this:

    [ $x => $y ]->[ $x <= $y ]

or

    [ $x => $y ]->[ $y >= $x ]

>     [ $x => $y ]->[ $y <= $x ]
> 
> /-\
> 
> 
> Find local movie times and trailers on Yahoo! Movies.
> http://au.movies.yahoo.com
--
Jose Alves de Castro <cog@cpan.org>
      http://jose-castro.org/

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