And to then avoid reproducing code (which probably negates the advantages of not using a temp variable) (untested):
@array1 = @array1[slicer(@array1)]; @array2 = @array2[slicer(@array1)]; sub slicer { grep { $_[$_] =~ /keep these/ } 0 .. $#_; }
-Bryan
In reply to Re^4: Use grep with two arrays
by mrborisguy
in thread Use grep with two arrays
by lampros21_7
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |