sorry I posted below the Bit::Vector idea here the untested code.#!/usr/bin/perl -w use strict; use warnings; use Bit::Vector; my @array; # contains numbers (1..1000000) ~ 400000 numbers my $vector = Bit::Vector->new(1000001); # please replace this bit --------- map { $vector->Bit_On($_) } @array; # --------------------------------- open (IN , "<", "in.txt") or die "$!"; while(<IN>){ m/^(\d+)/; print $_, ', ' if ($vector->bit_test($_)); } close IN;
In reply to Re: searching through data
by Anonymous Monk
in thread searching through data
by baxy77bax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |