use strict; use warnings; my @array; # contains numbers (1..1000000) ~ 400000 numbers my %hash; open (in , "<", "in.txt") || die "$!"; while(<in>){ m/^(\d+)/; $hash{$1} = 1; } close in; foreach my $num (@array) { print "$num, " if exists $hash{$num}; }
In reply to Re: searching through data
by dreadpiratepeter
in thread searching through data
by baxy77bax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |