in reply to Re: Array element removal
in thread Array element removal
As an aside, you are using global variables unnecessarily. Your code will be a lot clearer and cleaner, and less error prone, if you use lexical variables properly. use warnings; and use strict; to let perl help you write better code.my @new_data; for my $i ( 0 .. $#data ) { $data[$i][1] != $compare[$i] and push @new_data; } # replace: @data = @new_data;
jdporter
...porque es dificil estar guapo y blanco.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Array element removal
by sauoq (Abbot) on Dec 17, 2002 at 23:34 UTC | |
by BrowserUk (Patriarch) on Dec 17, 2002 at 23:46 UTC |