#!/usr/bin/perl -w use strict; my %myhash=(); my $myhash; sub do_hash { my ($filename)=@_; open(FH, $filename) or die "Can't open $filename: $!\n"; while(){ chomp; my ($Name, $Data)=split/\t/; } close FH; } open(DATA_LIST, "){ chomp; my ($Line,$Filed,$Dvalue)=split/\t/; #open(MYHASH, ">myhash") or die "Can't open myhash to write : $!\n"; do_hash("file_data"); print $myhash{$Line},"\n"; if (exists $myhash{$Line}){ print $Filed,"\t ",$Dvalue,"\t", $myhash{$Line},"\n"; } }