$array = [ ] ;
is sufficient. This will effectively "clear" the array. Depending on your requirements, $i=[ 0 ] , $i=undef ], and $i may be all equivalent.
Remember that undef is actually an array element. I have caught myself thinking that @array = (undef) is an empty array. Nope. It is a single-element array with the element undef!
In reply to Re: passing a value to a function
by ishmael
in thread passing a value to a function
by ralfthewise
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |