Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Re^2: The High Price of Golf, and A Surprise

by broquaint (Abbot)
on Sep 07, 2002 at 17:04 UTC ( #195883=note: print w/ replies, xml ) Need Help??


in reply to Re^2: The High Price of Golf, and A Surprise
in thread The High Price of Golf, and A Surprise

Small note which makes no difference to the deparsed syntax is that sort() used in a void context is a no-op (sp?). So all those sort()s could be deparsed down to

$ perl -MO=Deparse,x7 -e'sort { $b <=> $a } @x' -e syntax OK

_________
broquaint


Comment on Re: Re^2: The High Price of Golf, and A Surprise
Download Code
Re^4: The High Price of Golf, and A Surprise
by Aristotle (Chancellor) on Sep 07, 2002 at 18:27 UTC
    The output would have been empty then; it is apparently not considered a NOP either:
    $ perl -MO=Deparse,x7 -e'1;' '???'; -e syntax OK
    ('???' is what B::Deparse produces when something gets optimized away.) I'm guessing that's because a sort may have side effects f.ex with tied arrays or inside the callback (if there is one), or something to that effect.

    Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://195883]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2014-04-16 11:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (424 votes), past polls