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
  • PrintPrint
Share this Page URL
Help

Chapter 1. The Basics of Perl > Item 10. Don’t assign undef when you want an em...

Item 10. Don’t assign undef when you want an empty array

Uninitialized scalar variables in Perl have the value undef, a special value that stands for the absence of value. You can reset scalar variables to their uninitialized state by assigning undef to them or by using the undef() function:

my $toast = undef;
undef $history;


  

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


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint