more useful options | |
PerlMonks |
Re^3: Length of strings in an arrayby BillKSmith (Monsignor) |
on Sep 20, 2020 at 18:36 UTC ( [id://11121969]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|