Hello,
I think I understand the <=> operator, it returns -1 if left operand is less
then right, 0 if equal and +1 if left is greater then right. What I dont
understand is why this works:
@list = sort { $a<=>$b } ( @list ); # lowest to highest if $a and $b are
reversed highest to lowest
is there a way for the compare operator to return the higher or lower
operand?
Thanks,
Serge
- Re: spaceship operator <=> questi... SHAKARIAN,SERGE (HP-NewJersey,ex1)
- Re: spaceship operator <=> q... Rob Dixon
- Re: spaceship operator <=> q... R. Joseph Newton
- RE: spaceship operator <=> q... Hanson, Rob
- RE: spaceship operator <=> q... SHAKARIAN,SERGE (HP-NewJersey,ex1)
