Sorting in Perl

By Andrew Johnson, ITworld |  How-to

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
the

Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Answers - Powered by ITworld

ITworld Answers helps you solve problems and share expertise. Ask a question or take a crack at answering the new questions below.

Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Ask a Question