RE: Help with clearing an array

2002-01-14 Thread Stout, Joel R
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 > > >

Re: Help with clearing an array

2002-01-14 Thread Curtis Poe
--- Leon <[EMAIL PROTECTED]> wrote: > - 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 t

Re: Help with clearing an array

2002-01-14 Thread Leon
- 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 clea

Re: Help with clearing an array

2002-01-14 Thread Connie Chan
Hee.. @my_arry = undef; will make the array carrying 1 element --> undef it will not be a blank array =) have a nice day - Original Message - From: "Leon" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 15, 2002 7:54 AM Subject: Re: He

Re: Help with clearing an array

2002-01-14 Thread John W. Krahn
Leon wrote: > > From: "Steve Maroney" <[EMAIL PROTECTED]> > > > > @my_arry = ""; > > Can I use this :- > @my_arry = undef; $ perl -le' @array = qw(1 2 3 4 5); print scalar @array, ": @array"; @array = ""; print scalar @array, ": @array"; @array = qw(1 2 3 4 5); @array = undef; print scalar @ar

Re: Help with clearing an array

2002-01-14 Thread Steven Brooks
On Monday 14 January 2002 04:54 pm, you wrote: > Can I use this :- > @my_arry = undef; No, because it doesn't clear the array. Read the following quote: Small quote from "Learning Perl" page 53 - under the section "Using Scalar-Producing Expressions in a List Context" <> Going this direction is

Re: Help with clearing an array

2002-01-13 Thread Leon
- Original Message - From: "Steve Maroney" <[EMAIL PROTECTED]> To: "Michael Eggleton" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, January 13, 2002 11:12 PM Subject: Re: Help with clearing an array > > @my_arry = &quo

Re: Help with clearing an array

2002-01-13 Thread Steve Maroney
@my_arry = ""; On Mon, 14 Jan 2002, Michael Eggleton wrote: > Hello all, > > Could some one help me with clearing or re-setting and array. > > I have an array that has an unknow number of elements in it, at one > point in my program I would like to clear that array or reset it so > that it

Re: Help with clearing an array

2002-01-13 Thread Eric Beaudoin
At 00:39 2002.01.14, Michael Eggleton wrote: >Hello all, > > Could some one help me with clearing or re-setting and array. > > I have an array that has an unknow number of elements in it, at one >point in my program I would like to clear that array or reset it so >that it contains nothing. Ho

Help with clearing an array

2002-01-13 Thread Michael Eggleton
Hello all, Could some one help me with clearing or re-setting and array. I have an array that has an unknow number of elements in it, at one point in my program I would like to clear that array or reset it so that it contains nothing. How do I do that? Thanks Michael D. Eggleton http://