in reply to Re: Array question
in thread Array question
However i need the values that are not matching the creiria. If i include else then multiple rows are fetched. Thanks, Dinakarmy @new_duplicateip_results; foreach my $first (@$select_result) { foreach my $second (@$select_result) { if ((@$first->[0] eq @$second->[0]) && (@$first->[1] eq @$seco +nd->[1]) && (@$first->[$#{$first}] eq $self->product_id) && (@$second +->[$#{$second}] eq "WS-".$self->product_id)) { my $ip_string = "@$first->[0],@$first->[1],"; foreach (2..$#{$first}) { $ip_string .= @$first->[$_]+@$second->[$_].","; } my @split_array = split(/,/,$ip_string) ; push @new_duplicateip_results,\@split_array; } } } foreach (@new_duplicateip_results) { print STDERR join "#",@$_; print STDERR "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Array question
by GrandFather (Saint) on Sep 05, 2007 at 11:37 UTC | |
by Anonymous Monk on Sep 05, 2007 at 13:02 UTC | |
by GrandFather (Saint) on Sep 05, 2007 at 20:37 UTC | |
by udinakar (Novice) on Sep 06, 2007 at 08:58 UTC | |
by GrandFather (Saint) on Sep 06, 2007 at 11:28 UTC | |
by udinakar (Novice) on Sep 06, 2007 at 13:18 UTC | |
|
Re^3: Array question
by eric256 (Parson) on Sep 05, 2007 at 21:34 UTC |