Sorting in Perl

Perl's sort function works a little differently than the standard built-

in functions. Like map() and grep(), it can accept a block as a first

argument, but it can also accept a named subroutine, or a reference to

a subroutine, allowing you to specify the comparison method used in

sorting. Perl sorts alphabetically (ascii-betical) by default, using


Top 10 Hot Internet of Things Startups
View Comments
You Might Like
Join the discussion
Be the first to comment on this article. Our Commenting Policies