Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clearing an array

Status
Not open for further replies.

bluedragon2

IS-IT--Management
Joined
Jan 24, 2003
Messages
2,642
Location
US
To clear an array, is it as simple as:

@array = ();

[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
Yes, it is that simple.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Thanks

[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
I concur [bigglasses]

[rofl]

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those Who Say It Cannot Be Done Are Usually Interrupted by Someone Else Doing It; Give the wrong symptoms, get the wrong solutions;
 
Well yes :-) But it's faster to use undef...

Mike

When working on any project the value of other people is exactly that - they are other people, with views that don't necessarily match yours. This mismatch, between their views and the view you've been contentedly assuming is right, is where that value lies.
 
if you want to completely delete the array from the program undef is the way to go. It removes the array from the array namespace. Otherwise just reset/empty it like above.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top