Meh. Remove the two pushes. Should just be:
while (<LIST1>) { ($V1, $V2) = split /\t/; $all_V1{$V1}++; $all_V2{$V2}++; }
... the pushes were left overs from an earlier response I typed up but didn't submit, which used arrays.
I'll correct the code in my original answer too.
In reply to Re^3: Question on loops
by tobyink
in thread Question on loops
by Bforde
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |