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 15. Use $_ for elegance and brevity

Item 15. Use $_ for elegance and brevity

“Dollar underscore,” or $_—you may love it, or you may hate it, but either way, if you’re going to be a proficient Perl programmer, you need to understand it.

$_ is a default argument for many operators, and also for some control structures. Here are some examples:


  

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