in reply to Use grep with two arrays
my @keepers; foreach my $i (0..$#array1) { push @keepers, $i if $array1[$i] =~ /keep these/; } @array1 = @array1[@keepers]; @array2 = @array2[@keepers];
-QM
--
Quantum Mechanics: The dreams stuff is made of
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Use grep with two arrays
by revdiablo (Prior) on Feb 14, 2006 at 03:44 UTC | |
by Roy Johnson (Monsignor) on Feb 14, 2006 at 19:20 UTC | |
by QM (Parson) on Feb 14, 2006 at 17:54 UTC | |
by graff (Chancellor) on Feb 15, 2006 at 01:03 UTC | |
by QM (Parson) on Feb 15, 2006 at 20:53 UTC | |
by mrborisguy (Hermit) on Feb 14, 2006 at 18:44 UTC |