http://www.perlmonks.org?node_id=939836


in reply to Re: correspondence between two arrays
in thread correspondence between two arrays

open AD, "file1.txt"; @arr=<AD>; foreach $line(@arr) { $name{substr($line,0,4)}++; } close AD; #hash out of the contents of the first file=MADE #----------- open FH, "file2.txt"; @arr2=<FH>; foreach $a(@arr2) { @val=split(' ',$a); foreach $v($#val) if (...what do i do here???..) {print..... } }