Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Length of strings in an array

by BillKSmith (Monsignor)
on Sep 20, 2020 at 18:36 UTC ( [id://11121969]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Length of strings in an array
in thread Length of strings in an array

Athanasius uses the sort BLOCK LIST syntax of sort. The block is {$a <=> $b}. Blocks are documented in Basic BLOCKS. The operator (<=>) is described in Equality Operators. The package variables $a and $b are described through out the documentation for sort. The short answer is that this block tells sort to sort the list in numerical order rather than the default lexical order.
Bill

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-25 07:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found