develooper Front page | perl.perl5.porters | Postings from March 2001

~~, was Re: [FWP] Shortest scalarizer?

Thread Next
From:
Simon Cozens
Date:
March 30, 2001 11:26
Subject:
~~, was Re: [FWP] Shortest scalarizer?
Message ID:
20010330202608.A9866@netthink.co.uk
On Fri, Mar 30, 2001 at 12:19:01PM -0500, Steve Lane wrote:
> Bernie Cosell wrote:
> > So I tried to find something shorter and less obtrusive to
> > 'scalarize' the arg.
> 
> $ perl -le 'print ~~localtime'
> Fri Mar 30 12:18:03 2001

Neat, but I wonder whether the peephole optimizer shouldn't optimize ~~ away.
Would we lose any semantics that way? (I think the above would still work
because optimization happens after context propagation.)

-- 
Last week I forgot how to ride a bicycle.  -- Steven Wright

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