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
In reply to Re: Use grep with two arrays
by QM
in thread Use grep with two arrays
by lampros21_7
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |