Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Please explain this statement
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ray Yu  
View profile  
 More options Dec 24 2008, 2:21 am
From: Ray Yu <coffeef...@gmail.com>
Date: Tue, 23 Dec 2008 23:21:24 -0800 (PST)
Local: Wed, Dec 24 2008 2:21 am
Subject: Please explain this statement
sort {$ct->{$b} <=> $ct->{$a}}

I can't understand "<=>" , please explain this.
thanks


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
flw  
View profile  
 More options Dec 24 2008, 2:26 am
From: flw <su2ad...@gmail.com>
Date: Wed, 24 Dec 2008 15:26:51 +0800
Local: Wed, Dec 24 2008 2:26 am
Subject: Re: Please explain this statement
perldoc perlop | less -p 'Binary "<=>"'

       Binary "<=>" returns -1, 0, or 1 depending on whether the left argument
       is numerically less than, equal to, or greater than the right argument.
       If your platform supports NaNs (not-a-numbers) as numeric values, using
       them with "<=>" returns undef.  NaN is not "<", "==", ">", "<=" or ">="
       anything (even NaN), so those 5 return false. NaN != NaN returns true,
       as does NaN != anything else. If your platform doesn't support NaNs
       then NaN is just a string with numeric value 0.

2008/12/24 Ray Yu <coffeef...@gmail.com>:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ray Yu  
View profile  
 More options Dec 24 2008, 2:28 am
From: Ray Yu <coffeef...@gmail.com>
Date: Tue, 23 Dec 2008 23:28:34 -0800 (PST)
Local: Wed, Dec 24 2008 2:28 am
Subject: Re: Please explain this statement
I see.
Thank you.

On Dec 24, 3:26 pm, flw <su2ad...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Remi Mustapha  
View profile  
 More options Dec 24 2008, 8:34 am
From: "Remi Mustapha" <rmusta...@gmail.com>
Date: Wed, 24 Dec 2008 13:34:22 +0000
Local: Wed, Dec 24 2008 8:34 am
Subject: Re: Please explain this statement

sort $ct->{$b} to this format  $ct->{$a}
pretty much, its re-arranging the variable.  i think i'm right on this one.
it has been a while.

On Wed, Dec 24, 2008 at 7:21 AM, Ray Yu <coffeef...@gmail.com> wrote:

> sort {$ct->{$b} <=> $ct->{$a}}

> I can't understand "<=>" , please explain this.
> thanks

--
rafiu mustapha

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Praveen P  
View profile  
 More options Dec 26 2008, 12:11 am
From: "Praveen P" <pravee...@gmail.com>
Date: Fri, 26 Dec 2008 10:41:02 +0530
Local: Fri, Dec 26 2008 12:11 am
Subject: Re: Please explain this statement

hI,

FOR NUMERIC SORT  WE USE "<=>"
AND FOR STRING SORT WE USE "cmp"

if we use $a<=>$b THAT MEANS WE ARE GOING TO SORT IN ascending order
$b<=>$a then THAT MEANS descending order ....

PRAVEENZX~

On Wed, Dec 24, 2008 at 7:04 PM, Remi Mustapha <rmusta...@gmail.com> wrote:
> sort $ct->{$b} to this format  $ct->{$a}
> pretty much, its re-arranging the variable.  i think i'm right on this
> one.  it has been a while.

> On Wed, Dec 24, 2008 at 7:21 AM, Ray Yu <coffeef...@gmail.com> wrote:

>> sort {$ct->{$b} <=> $ct->{$a}}

>> I can't understand "<=>" , please explain this.
>> thanks >>

--
#####################
#          Praveen~          #
#     +919895066033     #
#####################

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google