Zero'ing out an array

D

Dr.Ruud

darkmoo schreef:
Subject: Zero'ing out an array
How does one do so?

Do you want the existing members to each become zero, or do you want to
delete them all?

See also `perldoc -q array`.
 
M

Mumia W.

How does one do so?

Unlike arrays in the C programming language, Perl arrays do
not need to be zero-ed out to clear them; just undefine the array:

undef @myarray;
 
D

David H. Adler

Unlike arrays in the C programming language, Perl arrays do
not need to be zero-ed out to clear them; just undefine the array:

undef @myarray;

Unless by "Zero'ing out an array" you mean setting each element to 0 (as
noted in this thread), or have it hold an empty list.

dha
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,610
Members
45,254
Latest member
Top Crypto TwitterChannel

Latest Threads

Top