Clearing a list 
Author Message
 Clearing a list

Can anyone forward some hints on clearing a list?  I was modifying one of the
examples to load and sort a file.  I wrote it as a subprocess and when it gets
called the second time it tacks new items onto the list instead of replacing
old ones.  Here is a sample piece:

        while(<MAILLOG>)
        {
                select(MAILLOG);
                $username = $_;
                $name = $username;
                $name_list{$name} .= $username;
        }
        close(MAILLOG);

Any tips are appreciated.

*******************************************************************************
* Matthew E. Moses *            __O              * "How many times do you     *
*  U of Minnesota  *          _ \<,_          * hear it? It goes on all    *
*                  *         (_)/ (_)            * all day long everyone      *



*******************************************************************************



Sat, 18 Feb 1995 10:02:52 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Perl for win32: How to catch the STDERR-Stream?? AND How to clear a list??

2. how to clear a @list ... ?

3. (undef || LIST) vs (LIST || LIST)

4. (undef || LIST) vs (LIST || LIST)

5. List of lists or array of lists in Perl

6. List of lists or array of lists in Perl

7. does Perl 5.0 support lists of lists?

8. How to do lists of lists?

9. list of lists (or non-scalar array values)

10. List of lists?

11. Permute List of Lists?

12. Lists of lists

 

 
Powered by phpBB® Forum Software