Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 2. Idiomatic Perl > Item 26. Use List::Util and List::MoreUtils for eas...

Item 26. Use List::Util and List::MoreUtils for easy list manipulation

One of the keys to grokking Perl is knowing how to work with lists. Indeed, in his preface to Higher Order Perl, Mark Jason Dominus says that Perl is more like Lisp than it is like C. Perl has the built-ins like map, grep, and foreach that you can use to build up complex list handling. Some list operations are so common that you can use fast, C implementations of them in either List::Util or List::MoreUtils.

Find the maximum value quickly

If you need to find the maximum number in a list, you can easily do it yourself in pure Perl:


  

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