The rest is left as an exercise for the reader. You should get the gist.open A, "<fileA" || die $!; open B, "<fileA" || die $!; open OUT, ">fileAtmp" || die $!; my ($bufA, $bufB); while ($bufA = <A>) { $bufB = <B> || last; #jump out if file B is shorter than A my @A = split ':', $bufA; my @B = split ':', $bufB; print OUT $bufA if $A[0] eq $B[0]; } close A; close B; close OUT;
In reply to Re: hash jerkin
by Cabrion
in thread hash jerkin
by rerunn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |