faqts : Computers : Programming : Languages : Perl : Common Problems : Arrays

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

88 of 94 people (94%) answered Yes
Recently 10 of 10 people (100%) answered Yes

Entry

How do I clear an array?

Jun 16th, 2001 09:32
Per M Knutsen,


To clear all contents of an array assign it an empty list, or use undef 
@array. Examples:
  @array = ();
or
  undef @array;