Going Deeper

In this lesson, I've shown you how to use many of the more popular functions for modifying or mangling lists and strings. And, in turn, I've only described the more common uses of these functions. If you're interested in more detail about any of these functions, or about any functions I haven't described in this book, see Appendix A or the perlfunc man page.

Some of the functions in this chapter have features I didn't talk about, mostly because they involve things you haven't learned yet. For example, the sorting routine for the sort function (the part inside the curly brackets) can be replaced with an actual subroutine name, which allows you to use that subroutine in many different places and to write quite sophisticated sort routines indeed.

The pop and shift functions, in turn, can also be used with no arguments. What list they affect depends on where in your script they're used: pop and shift with no arguments in the main body of the script pops or shifts the @ARGV array (containing the arguments to the script); pop and shift inside a subroutine affect the @_ argument list to that subroutine (which you'll learn about when we get to Day 11, “Creating and Using Subroutines”).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset