Hello,

I'm trying to map two files INPUT1 to INPUT2.  I
believe that I've made a syntax error somewhere
because I'm not retrieving any ouput; yet I know that
there are IDs in INPUT2 (via $id2) that exist in
INPUT1 (via $id_1b).

Also, is there a general, more efficient, way to map
files that contain similar identifier strings?

Thank you for any advice,
David

foreach $line2 (<INPUT2>) {
    ($id2,$remainder) = split(/\t/,$line2,2);
    foreach $line1 (<INPUT1>) {
        ($id_1a,$id_1b) = split (/\t/,$line1,2);
        chomp($id_1b);
        if ($id2 eq $id_1b) {
            print OUTPUT "$id2\t$id_1a\t$remainder";
        } else {
            next;
        }
    }
}

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to