Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: (jeffa) Re: Sorting Numbers

by educated_foo (Vicar)
on Nov 06, 2001 at 11:07 UTC ( [id://123527]=note: print w/replies, xml ) Need Help??


in reply to Re: (jeffa) Re: Sorting Numbers
in thread Sorting Numbers

From the perspective of sheer laziness, would it work to replace the
"local ($a, $b) = @_"
with a
"local ($b, $a) = @_"
? Reversed sort order, no comprehension or re-writing required.

/s

Replies are listed 'Best First'.
Re: Re: Re: (jeffa) Re: Sorting Numbers
by pixel (Scribe) on Nov 06, 2001 at 13:56 UTC

    Except of course $a and $b aren't actually passed into the sort function like that. Which is presumeably why that line is commented out :-)

    Blessed Be
    The Pixel

      Argh, how disgusting. But this should probably do the trick:
      local ($a, $b) = ($b, $a)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (7)
As of 2024-04-18 17:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found