Item 22. Learn the myriad ways of sorting
At its most basic, sorting in Perl is simplicity itself. Perl’s sort operator takes a list of elements and returns a copy of that list in order:
my @elements = sort qw(
hydrogen
helium
lithium
);
You are currently reading a PREVIEW of this book.
Get instant access to over
$1 million worth of books and videos.
Start a Free Trial