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

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

Thread Next
Simon Cozens
March 30, 2001 11:26
~~, was Re: [FWP] Shortest scalarizer?
Message ID:
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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About