my $A; my $i; my @domain_A = (1..119); for (@domain_A) { vec($A,$_,1) = 1 } for ( $i = -100 ; $i <= 2000 ; $i++ ) { if (vec($A,$i,1)){ print "\t $i recognised as part of the 1st domain using the old method\n"; } } #### my @domains = ( [1..119], [325..648], [649..879], [880..1110], [1111..1229], [1230..1354] ); my $i; my @total_coords = (); for ( $i = 0 ; $i <= 5 ; $i++ ) { push @total_coords, ( [0,0,0] ); my $scratch = "domains$i" ; for (@{$domains[$i]}) { vec($scratch,$_,1) = 1} } for ( $i = -100 ; $i <= 2000 ; $i++ ) { if (vec("domains$i",$i,1)){ print "\t $i recognised as part of the 1st domain using the new method\n"; } }