my ($temp) = [121, 122, 123, 124, 125, etc...] #### foreach $id (@$temp) { # do things with $id } #### @hash{@$temp}=@$t; foreach $id (keys %hash) { # do things with $id } #### if ($hash{120}) { # id 120 exists }
## foreach $id (@$temp) { # do things with $id } ##
## @hash{@$temp}=@$t; foreach $id (keys %hash) { # do things with $id } ##
## if ($hash{120}) { # id 120 exists }