perldoc perldata says for clearing arrays:

@array = ();

or...

$#array = -1;


> -----Original Message-----
> From: Leon [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 15, 2002 8:19 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Help with clearing an array
> 
> 
> ----- Original Message -----
> From: "John W. Krahn" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> 
> > @array = qw(1 2 3 4 5);
> > @array = ();
> > print scalar @array, ": @array";
> > 0:
> >
> > As you can see @array = ""; and @array = undef; don't clear 
> the array.
> 
> This gives me an idea of assigning 0 for clearing of arrays, scalar or
> hashes;
> eg :-
> my ($scalar , @array , %hash ) = ();
> or
> my $scalar = 0;
> my @array = 0;
> my %hash = 0;
> 
> Are the above acceptable? Seems to be.
> 
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to