You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

18 lines
371 B

#!/usr/bin/perl
#
sub grepa {
# Parms
# (\@boola, \@data)
# Returned value.
# Array of the @data array with a cooresponding value of @boola that is true.
my (@reta, $bool, $data, $index) ;
($bool, $data) = @_ ;
for ($index=0; $index<=$#$data ; $index++) {
push @reta, $$data[$index] if ($$bool[$index]) ;
}
return @reta ;
}
1 ; # Needed for a require file.