in reply to Re: Use grep with two arrays
in thread Use grep with two arrays
Just for giggles, here's that using grep:
my @keepers = grep { $array1[$_] =~ /keep these/ } 0 .. $#array1; @array1 = @array1[@keepers]; @array2 = @array2[@keepers];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Use grep with two arrays
by Roy Johnson (Monsignor) on Feb 14, 2006 at 19:20 UTC | |
|
Re^3: Use grep with two arrays
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 |